aboutsummaryrefslogtreecommitdiff
path: root/gdb/buildsym.c
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.c
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.c')
-rw-r--r--gdb/buildsym.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index c970762..08e4062 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -667,7 +667,7 @@ buildsym_compunit::pop_subfile ()
void
buildsym_compunit::record_line (struct subfile *subfile, int line,
- CORE_ADDR pc, bool is_stmt)
+ CORE_ADDR pc, linetable_entry_flags flags)
{
struct linetable_entry *e;
@@ -723,7 +723,7 @@ buildsym_compunit::record_line (struct subfile *subfile, int line,
e = subfile->line_vector->item + subfile->line_vector->nitems++;
e->line = line;
- e->is_stmt = is_stmt ? 1 : 0;
+ e->is_stmt = (flags & LEF_IS_STMT) != 0;
e->pc = pc;
}