* printcmd.c (print_frame_args, print_frame_nameless_args):
Let print_frame_nameless_args decide whether there are any, laying groundwork for possibly later printing 29K args for functions where we have tag words but no symbols.
This commit is contained in:
parent
2477c7c25f
commit
7dc15bb750
@ -1,3 +1,10 @@
|
|||||||
|
Tue Feb 2 00:19:08 1993 John Gilmore (gnu@cygnus.com)
|
||||||
|
|
||||||
|
* printcmd.c (print_frame_args, print_frame_nameless_args):
|
||||||
|
Let print_frame_nameless_args decide whether there are any,
|
||||||
|
laying groundwork for possibly later printing 29K args for
|
||||||
|
functions where we have tag words but no symbols.
|
||||||
|
|
||||||
Mon Feb 1 18:09:58 1993 Roland H. Pesch (pesch@fowanton.cygnus.com)
|
Mon Feb 1 18:09:58 1993 Roland H. Pesch (pesch@fowanton.cygnus.com)
|
||||||
|
|
||||||
* Makefile.in: fix GDB doc targets for new doc subdir structure
|
* Makefile.in: fix GDB doc targets for new doc subdir structure
|
||||||
|
@ -305,6 +305,7 @@ print_formatted (val, format, size)
|
|||||||
default:
|
default:
|
||||||
if (format == 0
|
if (format == 0
|
||||||
|| TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_ARRAY
|
|| TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_ARRAY
|
||||||
|
|| TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_STRING
|
||||||
|| TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_STRUCT
|
|| TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_STRUCT
|
||||||
|| TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_UNION
|
|| TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_UNION
|
||||||
|| VALUE_REPEATED (val))
|
|| VALUE_REPEATED (val))
|
||||||
@ -703,6 +704,11 @@ validate_format (fmt, cmdname)
|
|||||||
fmt.format, cmdname);
|
fmt.format, cmdname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Evaluate string EXP as an expression in the current language and
|
||||||
|
print the resulting value. EXP may contain a format specifier as the
|
||||||
|
first argument ("/x myvar" for example, to print myvar in hex).
|
||||||
|
*/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_command_1 (exp, inspect, voidprint)
|
print_command_1 (exp, inspect, voidprint)
|
||||||
char *exp;
|
char *exp;
|
||||||
@ -1526,48 +1532,59 @@ print_frame_args (func, fi, num, stream)
|
|||||||
if (num != -1)
|
if (num != -1)
|
||||||
{
|
{
|
||||||
long start;
|
long start;
|
||||||
CORE_ADDR addr;
|
|
||||||
|
|
||||||
if (highest_offset == -1)
|
if (highest_offset == -1)
|
||||||
start = FRAME_ARGS_SKIP;
|
start = FRAME_ARGS_SKIP;
|
||||||
else
|
else
|
||||||
start = highest_offset;
|
start = highest_offset;
|
||||||
|
|
||||||
addr = FRAME_ARGS_ADDRESS (fi);
|
print_frame_nameless_args (fi, start, num - args_printed,
|
||||||
if (addr)
|
first, stream);
|
||||||
print_frame_nameless_args (addr, start, num - args_printed,
|
|
||||||
first, stream);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print nameless args on STREAM.
|
/* Print nameless args on STREAM.
|
||||||
ARGSADDR is the address of the arglist, START is the offset
|
FI is the frameinfo for this frame, START is the offset
|
||||||
of the first nameless arg, and NUM is the number of nameless args to
|
of the first nameless arg, and NUM is the number of nameless args to
|
||||||
print. FIRST is nonzero if this is the first argument (not just
|
print. FIRST is nonzero if this is the first argument (not just
|
||||||
the first nameless arg). */
|
the first nameless arg). */
|
||||||
static void
|
static void
|
||||||
print_frame_nameless_args (argsaddr, start, num, first, stream)
|
print_frame_nameless_args (fi, start, num, first, stream)
|
||||||
CORE_ADDR argsaddr;
|
struct frame_info *fi;
|
||||||
long start;
|
long start;
|
||||||
int num;
|
int num;
|
||||||
int first;
|
int first;
|
||||||
FILE *stream;
|
FILE *stream;
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
CORE_ADDR argsaddr;
|
||||||
|
long arg_value;
|
||||||
|
|
||||||
for (i = 0; i < num; i++)
|
for (i = 0; i < num; i++)
|
||||||
{
|
{
|
||||||
QUIT;
|
QUIT;
|
||||||
|
#ifdef NAMELESS_ARG_VALUE
|
||||||
|
NAMELESS_ARG_VALUE (fi, start, &arg_value);
|
||||||
|
#else
|
||||||
|
argsaddr = FRAME_ARGS_ADDRESS (fi);
|
||||||
|
if (!argsaddr)
|
||||||
|
return;
|
||||||
|
|
||||||
|
arg_value = read_memory_integer (argsaddr + start, sizeof (int));
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!first)
|
if (!first)
|
||||||
fprintf_filtered (stream, ", ");
|
fprintf_filtered (stream, ", ");
|
||||||
#ifndef PRINT_TYPELESS_INTEGER
|
|
||||||
fprintf_filtered (stream, "%d",
|
#ifdef PRINT_NAMELESS_INTEGER
|
||||||
read_memory_integer (argsaddr + start, sizeof (int)));
|
PRINT_NAMELESS_INTEGER (stream, arg_value);
|
||||||
#else
|
#else
|
||||||
PRINT_TYPELESS_INTEGER (stream, builtin_type_int,
|
#ifdef PRINT_TYPELESS_INTEGER
|
||||||
(LONGEST)
|
PRINT_TYPELESS_INTEGER (stream, builtin_type_int, (LONGEST) arg_value);
|
||||||
read_memory_integer (argsaddr + start,
|
#else
|
||||||
sizeof (int)));
|
fprintf_filtered (stream, "%d", arg_value);
|
||||||
#endif
|
#endif /* PRINT_TYPELESS_INTEGER */
|
||||||
|
#endif /* PRINT_NAMELESS_INTEGER */
|
||||||
first = 0;
|
first = 0;
|
||||||
start += sizeof (int);
|
start += sizeof (int);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user