aboutsummaryrefslogtreecommitdiff
path: root/gdb/disasm.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2016-01-21 12:56:25 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2016-01-21 12:56:25 +0100
commit4a099de2e7e5374d633ba0eab4273b6f5c81ba74 (patch)
tree02e425398be6813577954d96c9945382253fb102 /gdb/disasm.c
parenta994041db36c9a6058fe591c7ccd018ed7affc76 (diff)
downloadgdb-4a099de2e7e5374d633ba0eab4273b6f5c81ba74.zip
gdb-4a099de2e7e5374d633ba0eab4273b6f5c81ba74.tar.gz
gdb-4a099de2e7e5374d633ba0eab4273b6f5c81ba74.tar.bz2
gdb: Small cleanup to disasm.c:maybe_add_dis_line_entry
Give the function a better name (drop "maybe_") and update the header comment. gdb/ChangeLog: * disasm.c (maybe_add_dis_line_entry): Rename to... (add_dis_line_entry): ...this, and update header comment. (do_mixed_source_and_assembly): Now use add_dis_line_entry.
Diffstat (limited to 'gdb/disasm.c')
-rw-r--r--gdb/disasm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/disasm.c b/gdb/disasm.c
index 9405928..1cf0901 100644
--- a/gdb/disasm.c
+++ b/gdb/disasm.c
@@ -86,11 +86,10 @@ allocate_dis_line_table (void)
xfree, xcalloc, xfree);
}
-/* Add DLE to TABLE.
- Returns 1 if added, 0 if already present. */
+/* Add a new dis_line_entry containing SYMTAB and LINE to TABLE. */
static void
-maybe_add_dis_line_entry (htab_t table, struct symtab *symtab, int line)
+add_dis_line_entry (htab_t table, struct symtab *symtab, int line)
{
void **slot;
struct dis_line_entry dle, *dlep;
@@ -552,7 +551,7 @@ do_mixed_source_and_assembly (struct gdbarch *gdbarch, struct ui_out *uiout,
pc += length;
if (sal.symtab != NULL)
- maybe_add_dis_line_entry (dis_line_table, sal.symtab, sal.line);
+ add_dis_line_entry (dis_line_table, sal.symtab, sal.line);
}
/* Second pass: print the disassembly.