aboutsummaryrefslogtreecommitdiff
path: root/gdb/buildsym.h
diff options
context:
space:
mode:
authorLancelot SIX <lancelot.six@amd.com>2022-03-07 17:36:53 +0000
committerLancelot SIX <lancelot.six@amd.com>2022-04-04 23:03:32 +0100
commit6cacd78ba5bb705e127d60478c71955b37914c53 (patch)
tree57ea0c7a6068ff6a199aebedbae439c0b8226bb8 /gdb/buildsym.h
parent962937b15dd570e44109f3c8196a392b788837ba (diff)
downloadgdb-6cacd78ba5bb705e127d60478c71955b37914c53.zip
gdb-6cacd78ba5bb705e127d60478c71955b37914c53.tar.gz
gdb-6cacd78ba5bb705e127d60478c71955b37914c53.tar.bz2
gdb/buildsym: Line record use a record flag
Currently when recording a line entry (with buildsym_compunit::record_line), a boolean argument argument is used to indicate that the is_stmt flag should be set for this particular record. As a later commit will add support for new flags, instead of adding a parameter to record_line for each possible flag, transform the current is_stmt parameter into a enum flag. This flags parameter will allow greater flexibility in future commits. This enum flags type is not propagated into the linetable_entry type as this would require a lot of changes across the codebase for no practical gain (it currently uses a bitfield where each interesting flag only occupy 1 bit in the structure). Tested on x86_64-linux, no regression observed. Change-Id: I5d061fa67bdb34918742505ff983d37453839d6a
Diffstat (limited to 'gdb/buildsym.h')
-rw-r--r--gdb/buildsym.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/gdb/buildsym.h b/gdb/buildsym.h
index fa774db..00e5778 100644
--- a/gdb/buildsym.h
+++ b/gdb/buildsym.h
@@ -110,6 +110,16 @@ struct context_stack
};
+/* Flags associated with a linetable entry. */
+
+enum linetable_entry_flag : unsigned
+{
+ /* Indicates this PC is a good location to place a breakpoint at LINE. */
+ LEF_IS_STMT = 1 << 1,
+};
+DEF_ENUM_FLAGS_TYPE (enum linetable_entry_flag, linetable_entry_flags);
+
+
/* Buildsym's counterpart to struct compunit_symtab. */
struct buildsym_compunit
@@ -188,7 +198,7 @@ struct buildsym_compunit
const char *pop_subfile ();
void record_line (struct subfile *subfile, int line, CORE_ADDR pc,
- bool is_stmt);
+ linetable_entry_flags flags);
struct compunit_symtab *get_compunit_symtab ()
{