aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.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/dwarf2read.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/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c49
1 files changed, 29 insertions, 20 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 89dcb45..26baba5 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -7226,6 +7226,7 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
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;
@@ -7245,6 +7246,7 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
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)
{
@@ -7285,16 +7287,18 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
{
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;
@@ -7363,16 +7367,18 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
{
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;
@@ -7452,7 +7458,10 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
{
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);
+ }
}
}