aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/gdbhelpers
AgeCommit message (Collapse)AuthorFilesLines
2019-11-25spec: get rid of all specifier MOD_XXXLuc Van Oostenryck1-15/+0
Modifiers like MOD_CHAR, MOD_LONG, ... are used to keep track of the size/rank of integers and floats. But this is problematic: * they use 5 of the precious modifiers bits * they're not really modifiers but the base of the primitive types * a 'long double' has MOD_LONGLONG set Change this by using instead the explicit notion of 'rank'. The advanatges are: * using only 3 bits (in struct symbol) * free 5 modifier bits * follow closely the definition & rules of the standard * things like integer promotion are slightly simpler. Note: this is somewhat experimental as I'm not yet convinced that everything is correct (but the testsuite is OK and gives the same result for a defconfig + allyesconfig build of the kernel). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2019-11-03remove unneeded MOD_TYPELuc Van Oostenryck1-3/+0
MOD_TYPE is used for the sparse extension which allow to directly compare types with each others. Expressions for direct type are EXPR_TYPE with the type in expr->symbol and the expression itself having it's type (expr->ctype) set to &type_ctype. This is one of the few base/builtin types and is the only one which can have MOD_TYPE. However, a specific modifier is not needed, the address of the symbol can simple be used (like it is done for 'bad_ctype' or 'incomplete_ctype'). Also, there is only a single place where MOD_TYPE is tested: is_type_ctype(), itself used a single time. So: * rewrite the unique test using is_type_ctype() by directly comparing with &type_ctype instead; * remove the now unused is_type_ctype(); * remove MOD_TYPE from type_ctype's definition; * remove MOD_TYPE's definition; and spare one precious bit for other modifiers. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2017-11-08add support for C11's _Atomic as type qualifierLuc Van Oostenryck1-0/+3
This only add the parsing and checks as a type qualifier; there is no operational semantic associated with it. Note: this only support _Atomic as *type qualifier*, not as a *type specifier* (partly because there an ambiguity on how to parse '_Atomic' when followed by an open parenthesis (can be valid as qualifier and as specifier)). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2017-11-08associate MOD_RESTRICT with restrict-qualified variablesLuc Van Oostenryck1-0/+3
Note: there is still no semantic associated with 'restrict' but this is a preparatory step. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2017-11-08MOD_ACCESSED is not a type modifier ...Luc Van Oostenryck1-3/+0
but is used to track which inline functions are effectively used. So better remove it from the MOD_... and implement the same functionality via a flag in struct symbol. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2017-11-08remove never-used MOD_TYPEDEFLuc Van Oostenryck1-3/+0
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2009-08-01Add support for TImode type (__int128_t)Blue Swirl1-0/+3
GCC provides a 128 bit type called internally as TImode (__int128_t)on 64 bit platforms (at least x86_64 and Sparc64). These types are used by OpenBIOS. Add support for types "long long long", __mode__(TI) and __(u)int128_t. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Christopher Li <sparse@chrisli.org>
2009-07-18Don't mix storage class bits with ctype->modifiers while parsing typeAl Viro1-3/+0
Keep storage class (and "is it inline") explicitly in decl_state; translate to modifiers only when we are done with parsing. That avoids the need to separate MOD_STORAGE bits while constructing the type (e.g. in alloc_indirect_symbol(), etc.). It also allows to get rid of MOD_FORCE for good - instead of passing it to typename() we pass an int * and let typename() tell whether we'd got a force-cast. Indication of force-cast never makes it into the modifier bits at all. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Christopher Li <chrisl@hera.kernel.org>
2009-07-18Fix __label__ handlingAl Viro1-3/+0
a) __label__ in gcc is not a type, it's a statement. Accepted in the beginning of compound-statement, has form __label__ ident-list; b) instead of crapping into NS_SYMBOL namespace (and consequent shadowing issues), reassign the namespace to NS_LABEL after we'd bound it. We'll get block scope and label namespace, i.e. what we get in gcc. c) MOD_LABEL can be dropped now. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Christopher Li <sparse@chrisli.org>
2008-12-18Gdb macros to get a better look at some sparse data structures.Alexey Zaytsev1-0/+310
Note that we need to build sparse with -g3 -gdwarf-2 to get the cpp macros included into the debug ingo. Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>