along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+#include "arch-utils.h"
#include "symtab.h"
#include "frame.h"
#include "gdbtypes.h"
old_chain = make_cleanup (xfree, sals.sals);
if (sal.symtab == 0)
{
+ struct gdbarch *gdbarch = get_current_arch ();
+
printf_filtered ("TFIND: No line number information available");
if (sal.pc != 0)
{
have the symbolic address. */
printf_filtered (" for address ");
wrap_here (" ");
- print_address (sal.pc, gdb_stdout);
+ print_address (gdbarch, sal.pc, gdb_stdout);
printf_filtered (";\n -- will attempt to find by PC. \n");
}
else
else if (sal.line > 0
&& find_line_pc_range (sal, &start_pc, &end_pc))
{
+ struct gdbarch *gdbarch = get_objfile_arch (sal.symtab->objfile);
+
if (start_pc == end_pc)
{
printf_filtered ("Line %d of \"%s\"",
sal.line, sal.symtab->filename);
wrap_here (" ");
printf_filtered (" is at address ");
- print_address (start_pc, gdb_stdout);
+ print_address (gdbarch, start_pc, gdb_stdout);
wrap_here (" ");
printf_filtered (" but contains no code.\n");
sal = find_pc_line (start_pc, 0);
break;
case LOC_STATIC:
printf_filtered ("in static storage at address ");
- printf_filtered ("%s", paddress (SYMBOL_VALUE_ADDRESS (sym)));
+ printf_filtered ("%s", paddress (gdbarch,
+ SYMBOL_VALUE_ADDRESS (sym)));
break;
case LOC_REGISTER:
/* GDBARCH is the architecture associated with the objfile
continue;
case LOC_LABEL:
printf_filtered ("a label at address ");
- printf_filtered ("%s", paddress (SYMBOL_VALUE_ADDRESS (sym)));
+ printf_filtered ("%s", paddress (gdbarch,
+ SYMBOL_VALUE_ADDRESS (sym)));
break;
case LOC_BLOCK:
printf_filtered ("a function at address ");
- printf_filtered ("%s", paddress (BLOCK_START (SYMBOL_BLOCK_VALUE (sym))));
+ printf_filtered ("%s",
+ paddress (gdbarch, BLOCK_START (SYMBOL_BLOCK_VALUE (sym))));
break;
case LOC_UNRESOLVED:
msym = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (sym),
else
{
printf_filtered ("static storage at address ");
- printf_filtered ("%s", paddress (SYMBOL_VALUE_ADDRESS (msym)));
+ printf_filtered ("%s",
+ paddress (gdbarch, SYMBOL_VALUE_ADDRESS (msym)));
}
break;
case LOC_OPTIMIZED_OUT: