save some memory, but for many debug format--ELF/DWARF or
anything/stabs--it would be inconvenient to eliminate those minimal
symbols anyway). */
save some memory, but for many debug format--ELF/DWARF or
anything/stabs--it would be inconvenient to eliminate those minimal
symbols anyway). */
- if (msymbol != NULL
- && MSYMBOL_HAS_SIZE (msymbol)
- && MSYMBOL_SIZE (msymbol) == 0
- && MSYMBOL_TYPE (msymbol) != mst_text
- && MSYMBOL_TYPE (msymbol) != mst_text_gnu_ifunc
- && MSYMBOL_TYPE (msymbol) != mst_file_text)
- msymbol = NULL;
+ if (msymbol.minsym != NULL
+ && MSYMBOL_HAS_SIZE (msymbol.minsym)
+ && MSYMBOL_SIZE (msymbol.minsym) == 0
+ && MSYMBOL_TYPE (msymbol.minsym) != mst_text
+ && MSYMBOL_TYPE (msymbol.minsym) != mst_text_gnu_ifunc
+ && MSYMBOL_TYPE (msymbol.minsym) != mst_file_text)
+ msymbol.minsym = NULL;
{
/* If this is a function (i.e. a code address), strip out any
non-address bits. For instance, display a pointer to the
first instruction of a Thumb function as <function>; the
second instruction will be <function+2>, even though the
pointer is <function+3>. This matches the ISA behavior. */
{
/* If this is a function (i.e. a code address), strip out any
non-address bits. For instance, display a pointer to the
first instruction of a Thumb function as <function>; the
second instruction will be <function+2>, even though the
pointer is <function+3>. This matches the ISA behavior. */
- if (MSYMBOL_TYPE (msymbol) == mst_text
- || MSYMBOL_TYPE (msymbol) == mst_text_gnu_ifunc
- || MSYMBOL_TYPE (msymbol) == mst_file_text
- || MSYMBOL_TYPE (msymbol) == mst_solib_trampoline)
+ if (MSYMBOL_TYPE (msymbol.minsym) == mst_text
+ || MSYMBOL_TYPE (msymbol.minsym) == mst_text_gnu_ifunc
+ || MSYMBOL_TYPE (msymbol.minsym) == mst_file_text
+ || MSYMBOL_TYPE (msymbol.minsym) == mst_solib_trampoline)
addr = gdbarch_addr_bits_remove (gdbarch, addr);
/* The msymbol is closer to the address than the symbol;
use the msymbol instead. */
symbol = 0;
addr = gdbarch_addr_bits_remove (gdbarch, addr);
/* The msymbol is closer to the address than the symbol;
use the msymbol instead. */
symbol = 0;
print_formatted (val, fmt.size, &opts, gdb_stdout);
printf_filtered ("\n");
print_formatted (val, fmt.size, &opts, gdb_stdout);
printf_filtered ("\n");
mapped = section_is_mapped (osect) ? _("mapped") : _("unmapped");
sec_name = osect->the_bfd_section->name;
mapped = section_is_mapped (osect) ? _("mapped") : _("unmapped");
sec_name = osect->the_bfd_section->name;
/* Don't print the offset if it is zero.
We assume there's no need to handle i18n of "sym + offset". */
/* Don't print the offset if it is zero.
We assume there's no need to handle i18n of "sym + offset". */
a pagination request inside printf_filtered. */
old_chain = make_cleanup (xfree, loc_string);
a pagination request inside printf_filtered. */
old_chain = make_cleanup (xfree, loc_string);
long val;
struct obj_section *section;
CORE_ADDR load_addr, context_pc = 0;
long val;
struct obj_section *section;
CORE_ADDR load_addr, context_pc = 0;
printf_filtered ("Symbol \"");
fprintf_symbol_filtered (gdb_stdout, exp,
printf_filtered ("Symbol \"");
fprintf_symbol_filtered (gdb_stdout, exp,
printf_filtered ("\" is at ");
fputs_filtered (paddress (gdbarch, load_addr), gdb_stdout);
printf_filtered (" in a file compiled without debugging");
printf_filtered ("\" is at ");
fputs_filtered (paddress (gdbarch, load_addr), gdb_stdout);
printf_filtered (" in a file compiled without debugging");
if (section_is_overlay (section))
{
load_addr = overlay_unmapped_address (load_addr, section);
if (section_is_overlay (section))
{
load_addr = overlay_unmapped_address (load_addr, section);
current_language->la_language, DMGL_ANSI);
printf_filtered ("\" is ");
val = SYMBOL_VALUE (sym);
current_language->la_language, DMGL_ANSI);
printf_filtered ("\" is ");
val = SYMBOL_VALUE (sym);
- section = SYMBOL_OBJ_SECTION (SYMBOL_OBJFILE (sym), sym);
- gdbarch = get_objfile_arch (SYMBOL_SYMTAB (sym)->objfile);
+ if (SYMBOL_OBJFILE_OWNED (sym))
+ section = SYMBOL_OBJ_SECTION (symbol_objfile (sym), sym);
+ else
+ section = NULL;
+ gdbarch = symbol_arch (sym);
- section = SYMBOL_OBJ_SECTION (msym.objfile, msym.minsym);
- load_addr = SYMBOL_VALUE_ADDRESS (msym.minsym);
+ section = MSYMBOL_OBJ_SECTION (msym.objfile, msym.minsym);
+ load_addr = BMSYMBOL_VALUE_ADDRESS (msym);
if (section
&& (section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0)
printf_filtered (_("a thread-local variable at offset %s "
"in the thread-local storage for `%s'"),
paddress (gdbarch, load_addr),
if (section
&& (section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0)
printf_filtered (_("a thread-local variable at offset %s "
"in the thread-local storage for `%s'"),
paddress (gdbarch, load_addr),
- new->exp_string = xstrdup (exp);
- new->exp = expr;
- new->block = innermost_block;
- new->pspace = current_program_space;
- new->next = display_chain;
- new->number = ++display_number;
- new->format = fmt;
- new->enabled_p = 1;
- display_chain = new;
+ newobj->exp_string = xstrdup (exp);
+ newobj->exp = expr;
+ newobj->block = innermost_block;
+ newobj->pspace = current_program_space;
+ newobj->next = display_chain;
+ newobj->number = ++display_number;
+ newobj->format = fmt;
+ newobj->enabled_p = 1;
+ display_chain = newobj;
addr = gdbarch_addr_bits_remove (d->exp->gdbarch, addr);
do_examine (d->format, d->exp->gdbarch, addr);
}
addr = gdbarch_addr_bits_remove (d->exp->gdbarch, addr);
do_examine (d->format, d->exp->gdbarch, addr);
}
- if (ex.reason < 0)
- fprintf_filtered (gdb_stdout, _("<error: %s>\n"), ex.message);
+ CATCH (ex, RETURN_MASK_ERROR)
+ {
+ fprintf_filtered (gdb_stdout, _("<error: %s>\n"), ex.message);
+ }
+ END_CATCH
get_formatted_print_options (&opts, d->format.format);
opts.raw = d->format.raw;
get_formatted_print_options (&opts, d->format.format);
opts.raw = d->format.raw;
{
struct value *val;
val = evaluate_expression (d->exp);
print_formatted (val, d->format.size, &opts, gdb_stdout);
}
{
struct value *val;
val = evaluate_expression (d->exp);
print_formatted (val, d->format.size, &opts, gdb_stdout);
}
- if (ex.reason < 0)
- fprintf_filtered (gdb_stdout, _("<error: %s>"), ex.message);
+ CATCH (ex, RETURN_MASK_ERROR)
+ {
+ fprintf_filtered (gdb_stdout, _("<error: %s>"), ex.message);
+ }
+ END_CATCH
+
struct frame_info *frame,
struct ui_file *stream, int indent)
{
struct frame_info *frame,
struct ui_file *stream, int indent)
{
if (!name)
name = SYMBOL_PRINT_NAME (var);
fprintf_filtered (stream, "%s%s = ", n_spaces (2 * indent), name);
if (!name)
name = SYMBOL_PRINT_NAME (var);
fprintf_filtered (stream, "%s%s = ", n_spaces (2 * indent), name);
- if (except.reason < 0)
- fprintf_filtered(stream, "<error reading variable %s (%s)>", name,
- except.message);
+ CATCH (except, RETURN_MASK_ERROR)
+ {
+ fprintf_filtered(stream, "<error reading variable %s (%s)>", name,
+ except.message);
+ }
+ END_CATCH
+
printf_command (char *arg, int from_tty)
{
ui_printf (arg, gdb_stdout);
printf_command (char *arg, int from_tty)
{
ui_printf (arg, gdb_stdout);
add_info ("address", address_info,
_("Describe where symbol SYM is stored."));
add_info ("address", address_info,
_("Describe where symbol SYM is stored."));
ADDRESS is an expression for the memory address to examine.\n\
FMT is a repeat count followed by a format letter and a size letter.\n\
Format letters are o(octal), x(hex), d(decimal), u(unsigned decimal),\n\
ADDRESS is an expression for the memory address to examine.\n\
FMT is a repeat count followed by a format letter and a size letter.\n\
Format letters are o(octal), x(hex), d(decimal), u(unsigned decimal),\n\
- t(binary), f(float), a(address), i(instruction), c(char) and s(string).\n\
+ t(binary), f(float), a(address), i(instruction), c(char), s(string)\n\
+ and z(hex, zero padded on the left).\n\
Size letters are b(byte), h(halfword), w(word), g(giant, 8 bytes).\n\
The specified number of objects of the specified size are printed\n\
according to the format.\n\n\
Size letters are b(byte), h(halfword), w(word), g(giant, 8 bytes).\n\
The specified number of objects of the specified size are printed\n\
according to the format.\n\n\