* stack.c (print_frame_arg_vars), printcmd.c (print_frame_args):
Expand comments about LOC_ARG/LOC_LOCAL pairs.
This commit is contained in:
parent
f2c365f517
commit
31258e4f6f
|
@ -1,5 +1,8 @@
|
||||||
Wed Apr 21 14:29:57 1993 Jim Kingdon (kingdon@cygnus.com)
|
Wed Apr 21 14:29:57 1993 Jim Kingdon (kingdon@cygnus.com)
|
||||||
|
|
||||||
|
* stack.c (print_frame_arg_vars), printcmd.c (print_frame_args):
|
||||||
|
Expand comments about LOC_ARG/LOC_LOCAL pairs.
|
||||||
|
|
||||||
* coffread.c (read_coff_symtab): Use rewind before fseek.
|
* coffread.c (read_coff_symtab): Use rewind before fseek.
|
||||||
|
|
||||||
Wed Apr 21 14:24:19 1993 Per Bothner (bothner@cygnus.com)
|
Wed Apr 21 14:24:19 1993 Per Bothner (bothner@cygnus.com)
|
||||||
|
|
|
@ -995,6 +995,10 @@ address_info (exp, from_tty)
|
||||||
local_hex_string(BLOCK_START (SYMBOL_BLOCK_VALUE (sym))));
|
local_hex_string(BLOCK_START (SYMBOL_BLOCK_VALUE (sym))));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case LOC_OPTIMIZED_OUT:
|
||||||
|
printf_filtered ("optimized out");
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
printf ("of unknown (botched) type");
|
printf ("of unknown (botched) type");
|
||||||
break;
|
break;
|
||||||
|
@ -1511,24 +1515,31 @@ print_frame_args (func, fi, num, stream)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the symbol name is non-null,
|
/* We have to look up the symbol because arguments can have
|
||||||
we have to re-look-up the symbol because arguments often have
|
two entries (one a parameter, one a local) and the one we
|
||||||
two entries (one a parameter, one a register or local), and the one
|
want is the local, which lookup_symbol will find for us.
|
||||||
we want is the non-parm, which lookup_symbol will find for
|
This includes gcc1 (not gcc2) on the sparc when passing a
|
||||||
us. After this, sym could be any SYMBOL_CLASS...
|
small structure and gcc2 when the argument type is float
|
||||||
|
and it is passed as a double and converted to float by
|
||||||
|
the prologue (in the latter case the type of the LOC_ARG
|
||||||
|
symbol is double and the type of the LOC_LOCAL symbol is
|
||||||
|
float). It's possible this should be dealt with in
|
||||||
|
symbol reading the way it now is for LOC_REGPARM. */
|
||||||
|
/* But if the parameter name is null, don't try it.
|
||||||
Null parameter names occur on the RS/6000, for traceback tables.
|
Null parameter names occur on the RS/6000, for traceback tables.
|
||||||
FIXME, should we even print them? */
|
FIXME, should we even print them? */
|
||||||
|
|
||||||
if (*SYMBOL_NAME (sym))
|
if (*SYMBOL_NAME (sym))
|
||||||
sym = lookup_symbol (SYMBOL_NAME (sym),
|
sym = lookup_symbol
|
||||||
b, VAR_NAMESPACE, (int *)NULL, (struct symtab **)NULL);
|
(SYMBOL_NAME (sym),
|
||||||
|
b, VAR_NAMESPACE, (int *)NULL, (struct symtab **)NULL);
|
||||||
|
|
||||||
/* Print the current arg. */
|
/* Print the current arg. */
|
||||||
if (! first)
|
if (! first)
|
||||||
fprintf_filtered (stream, ", ");
|
fprintf_filtered (stream, ", ");
|
||||||
wrap_here (" ");
|
wrap_here (" ");
|
||||||
fprint_symbol (stream, SYMBOL_SOURCE_NAME (sym));
|
fprintf_symbol_filtered (stream, SYMBOL_SOURCE_NAME (sym),
|
||||||
|
SYMBOL_LANGUAGE (sym), DMGL_PARAMS | DMGL_ANSI);
|
||||||
fputs_filtered ("=", stream);
|
fputs_filtered ("=", stream);
|
||||||
|
|
||||||
/* Avoid value_print because it will deref ref parameters. We just
|
/* Avoid value_print because it will deref ref parameters. We just
|
||||||
|
@ -1931,9 +1942,8 @@ _initialize_printcmd ()
|
||||||
ADDRESS is an expression for the memory address to examine.\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\
|
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\
|
Format letters are o(octal), x(hex), d(decimal), u(unsigned decimal),\n\
|
||||||
f(float), a(address), i(instruction), c(char) and s(string).\n\
|
t(binary), f(float), a(address), i(instruction), c(char) and s(string).\n\
|
||||||
Size letters are b(byte), h(halfword), w(word), g(giant, 8 bytes).\n\
|
Size letters are b(byte), h(halfword), w(word), g(giant, 8 bytes).\n\
|
||||||
g is meaningful only with f, for type double.\n\
|
|
||||||
The specified number of objects of the specified size are printed\n\
|
The specified number of objects of the specified size are printed\n\
|
||||||
according to the format.\n\n\
|
according to the format.\n\n\
|
||||||
Defaults for format and size letters are those previously used.\n\
|
Defaults for format and size letters are those previously used.\n\
|
||||||
|
|
16
gdb/stack.c
16
gdb/stack.c
|
@ -887,10 +887,18 @@ print_frame_arg_vars (frame, stream)
|
||||||
values_printed = 1;
|
values_printed = 1;
|
||||||
fputs_filtered (SYMBOL_SOURCE_NAME (sym), stream);
|
fputs_filtered (SYMBOL_SOURCE_NAME (sym), stream);
|
||||||
fputs_filtered (" = ", stream);
|
fputs_filtered (" = ", stream);
|
||||||
/* We have to look up the symbol because arguments often have
|
|
||||||
two entries (one a parameter, one a register) and the one
|
/* We have to look up the symbol because arguments can have
|
||||||
we want is the register, which lookup_symbol will find for
|
two entries (one a parameter, one a local) and the one we
|
||||||
us. */
|
want is the local, which lookup_symbol will find for us.
|
||||||
|
This includes gcc1 (not gcc2) on the sparc when passing a
|
||||||
|
small structure and gcc2 when the argument type is float
|
||||||
|
and it is passed as a double and converted to float by
|
||||||
|
the prologue (in the latter case the type of the LOC_ARG
|
||||||
|
symbol is double and the type of the LOC_LOCAL symbol is
|
||||||
|
float). It's possible this should be dealt with in
|
||||||
|
symbol reading the way it now is for LOC_REGPARM. */
|
||||||
|
|
||||||
sym2 = lookup_symbol (SYMBOL_NAME (sym),
|
sym2 = lookup_symbol (SYMBOL_NAME (sym),
|
||||||
b, VAR_NAMESPACE, (int *)NULL, (struct symtab **)NULL);
|
b, VAR_NAMESPACE, (int *)NULL, (struct symtab **)NULL);
|
||||||
print_variable_value (sym2, frame, stream);
|
print_variable_value (sym2, frame, stream);
|
||||||
|
|
Loading…
Reference in New Issue