aboutsummaryrefslogtreecommitdiff
path: root/gdb/coffread.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2009-06-17 18:41:50 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2009-06-17 18:41:50 +0000
commitfbf6506463a5de555a76cfcc153d56dc1cb9bf4b (patch)
tree473da227a378fecec794edff816fd85bd901fffe /gdb/coffread.c
parent505e835dc07557a142853b0f18513b876f7b7625 (diff)
downloadgdb-fbf6506463a5de555a76cfcc153d56dc1cb9bf4b.zip
gdb-fbf6506463a5de555a76cfcc153d56dc1cb9bf4b.tar.gz
gdb-fbf6506463a5de555a76cfcc153d56dc1cb9bf4b.tar.bz2
* buildsym.c (record_line): Remove call to gdbarch_addr_bits_remove.
* coffread.c (coff_symtab_read): Call gdbarch_addr_bits_remove before calling record_line. (enter_linenos): Likewise. * dbxread.c (process_one_symbol): Likewise. * dwarf2read.c (dwarf_decode_lines): Likewise. * mdebugread.c (psymtab_to_symtab_1): Likewise. * xcoffread.c (enter_line_range): Likewise.
Diffstat (limited to 'gdb/coffread.c')
-rw-r--r--gdb/coffread.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 201cfa2..ee8b380 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -1024,7 +1024,8 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
for which we do not have any other statement-line-number. */
if (fcn_last_line == 1)
record_line (current_subfile, fcn_first_line,
- fcn_first_line_addr);
+ gdbarch_addr_bits_remove (gdbarch,
+ fcn_first_line_addr));
else
enter_linenos (fcn_line_ptr, fcn_first_line, fcn_last_line,
objfile);
@@ -1350,6 +1351,7 @@ static void
enter_linenos (long file_offset, int first_line,
int last_line, struct objfile *objfile)
{
+ struct gdbarch *gdbarch = get_objfile_arch (objfile);
char *rawptr;
struct internal_lineno lptr;
@@ -1382,9 +1384,12 @@ enter_linenos (long file_offset, int first_line,
/* The next function, or the sentinel, will have L_LNNO32 zero;
we exit. */
if (L_LNNO32 (&lptr) && L_LNNO32 (&lptr) <= last_line)
- record_line (current_subfile, first_line + L_LNNO32 (&lptr),
- lptr.l_addr.l_paddr
- + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)));
+ {
+ CORE_ADDR addr = lptr.l_addr.l_paddr;
+ addr += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+ record_line (current_subfile, first_line + L_LNNO32 (&lptr),
+ gdbarch_addr_bits_remove (gdbarch, addr));
+ }
else
break;
}