+2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * 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.
+
2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
* ax-gdb.c (gen_bitfield_ref): Add EXP argument, use expression
* sizeof (struct linetable_entry))));
}
- pc = gdbarch_addr_bits_remove (current_gdbarch, pc);
-
/* Normally, we treat lines as unsorted. But the end of sequence
marker is special. We sort line markers at the same PC by line
number, so end of sequence markers (which have line == 0) appear
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);
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;
/* 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;
}
which may have an N_FUN stabs at the end of the function,
but no N_SLINE stabs. */
if (sline_found_in_function)
- record_line (current_subfile, 0, last_function_start + valu);
+ {
+ CORE_ADDR addr = last_function_start + valu;
+ record_line (current_subfile, 0,
+ gdbarch_addr_bits_remove (gdbarch, addr));
+ }
within_function = 0;
new = pop_context ();
if (within_function && sline_found_in_function == 0)
{
- if (processing_gcc_compilation == 2)
- record_line (current_subfile, desc, last_function_start);
- else
- record_line (current_subfile, desc, valu);
+ CORE_ADDR addr = processing_gcc_compilation == 2 ?
+ last_function_start : valu;
+ record_line (current_subfile, desc,
+ gdbarch_addr_bits_remove (gdbarch, addr));
sline_found_in_function = 1;
}
else
- record_line (current_subfile, desc, valu);
+ record_line (current_subfile, desc,
+ gdbarch_addr_bits_remove (gdbarch, valu));
break;
case N_BCOMM:
unsigned char op_code, extended_op, adj_opcode;
CORE_ADDR baseaddr;
struct objfile *objfile = cu->objfile;
+ struct gdbarch *gdbarch = get_objfile_arch (objfile);
const int decode_for_pst_p = (pst != NULL);
struct subfile *last_subfile = NULL, *first_subfile = current_subfile;
int is_stmt = lh->default_is_stmt;
int basic_block = 0;
int end_sequence = 0;
+ CORE_ADDR addr;
if (!decode_for_pst_p && lh->num_file_names >= file)
{
{
lh->file_names[file - 1].included_p = 1;
if (!decode_for_pst_p)
- {
- if (last_subfile != current_subfile)
- {
- if (last_subfile)
- record_line (last_subfile, 0, address);
- last_subfile = current_subfile;
- }
+ {
+ if (last_subfile != current_subfile)
+ {
+ addr = gdbarch_addr_bits_remove (gdbarch, address);
+ if (last_subfile)
+ record_line (last_subfile, 0, addr);
+ last_subfile = current_subfile;
+ }
/* Append row to matrix using current values. */
- record_line (current_subfile, line,
- check_cu_functions (address, cu));
+ addr = check_cu_functions (address, cu);
+ addr = gdbarch_addr_bits_remove (gdbarch, addr);
+ record_line (current_subfile, line, addr);
}
}
basic_block = 1;
{
lh->file_names[file - 1].included_p = 1;
if (!decode_for_pst_p)
- {
- if (last_subfile != current_subfile)
- {
- if (last_subfile)
- record_line (last_subfile, 0, address);
- last_subfile = current_subfile;
- }
- record_line (current_subfile, line,
- check_cu_functions (address, cu));
- }
+ {
+ if (last_subfile != current_subfile)
+ {
+ addr = gdbarch_addr_bits_remove (gdbarch, address);
+ if (last_subfile)
+ record_line (last_subfile, 0, addr);
+ last_subfile = current_subfile;
+ }
+ addr = check_cu_functions (address, cu);
+ addr = gdbarch_addr_bits_remove (gdbarch, addr);
+ record_line (current_subfile, line, addr);
+ }
}
basic_block = 0;
break;
{
lh->file_names[file - 1].included_p = 1;
if (!decode_for_pst_p)
- record_line (current_subfile, 0, address);
+ {
+ addr = gdbarch_addr_bits_remove (gdbarch, address);
+ record_line (current_subfile, 0, addr);
+ }
}
}
if (processing_gcc_compilation != 0)
{
+ struct gdbarch *gdbarch = get_objfile_arch (pst->objfile);
/* This symbol table contains stabs-in-ecoff entries. */
{
/* Handle encoded stab line number. */
valu += ANOFFSET (pst->section_offsets, SECT_OFF_TEXT (pst->objfile));
- record_line (current_subfile, sh.index, valu);
+ record_line (current_subfile, sh.index,
+ gdbarch_addr_bits_remove (gdbarch, valu));
}
}
else if (sh.st == stProc || sh.st == stStaticProc
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;
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)
else
limit_offset -= 1;
- abfd = this_symtab_psymtab->objfile->obfd;
+ abfd = objfile->obfd;
linesz = coff_data (abfd)->local_linesz;
ext_lnno = alloca (linesz);
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;
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;
}
}