aboutsummaryrefslogtreecommitdiff
path: root/gdb/xcoffread.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/xcoffread.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/xcoffread.c')
-rw-r--r--gdb/xcoffread.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index d26838c..cdb8a20 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -765,6 +765,8 @@ enter_line_range (struct subfile *subfile, unsigned beginoffset, unsigned endoff
CORE_ADDR startaddr, /* offsets to line table */
CORE_ADDR endaddr, unsigned *firstLine)
{
+ struct objfile *objfile = this_symtab_psymtab->objfile;
+ struct gdbarch *gdbarch = get_objfile_arch (objfile);
unsigned int curoffset;
CORE_ADDR addr;
void *ext_lnno;
@@ -777,7 +779,7 @@ enter_line_range (struct subfile *subfile, unsigned beginoffset, unsigned endoff
return;
curoffset = beginoffset;
limit_offset =
- ((struct coff_symfile_info *) this_symtab_psymtab->objfile->deprecated_sym_private)
+ ((struct coff_symfile_info *) objfile->deprecated_sym_private)
->max_lineno_offset;
if (endoffset != 0)
@@ -793,7 +795,7 @@ enter_line_range (struct subfile *subfile, unsigned beginoffset, unsigned endoff
else
limit_offset -= 1;
- abfd = this_symtab_psymtab->objfile->obfd;
+ abfd = objfile->obfd;
linesz = coff_data (abfd)->local_linesz;
ext_lnno = alloca (linesz);
@@ -807,8 +809,7 @@ enter_line_range (struct subfile *subfile, unsigned beginoffset, unsigned endoff
addr = (int_lnno.l_lnno
? int_lnno.l_addr.l_paddr
: read_symbol_nvalue (int_lnno.l_addr.l_symndx));
- addr += ANOFFSET (this_symtab_psymtab->objfile->section_offsets,
- SECT_OFF_TEXT (this_symtab_psymtab->objfile));
+ addr += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
if (addr < startaddr || (endaddr && addr >= endaddr))
return;
@@ -816,11 +817,12 @@ enter_line_range (struct subfile *subfile, unsigned beginoffset, unsigned endoff
if (int_lnno.l_lnno == 0)
{
*firstLine = read_symbol_lineno (int_lnno.l_addr.l_symndx);
- record_line (subfile, 0, addr);
+ record_line (subfile, 0, gdbarch_addr_bits_remove (gdbarch, addr));
--(*firstLine);
}
else
- record_line (subfile, *firstLine + int_lnno.l_lnno, addr);
+ record_line (subfile, *firstLine + int_lnno.l_lnno,
+ gdbarch_addr_bits_remove (gdbarch, addr));
curoffset += linesz;
}
}