#include "gdbcmd.h"
#include "target.h"
#include "breakpoint.h"
+#include "demangle.h"
extern int asm_demangle; /* Whether to demangle syms in asm printouts */
extern int addressprint; /* Whether to print hex addresses in HLL " */
delete_display PARAMS ((int));
static void
-enable_display PARAMS ((char *));
+enable_display PARAMS ((char *, int));
static void
disable_display_command PARAMS ((char *, int));
print_frame_nameless_args PARAMS ((CORE_ADDR, long, int, int, FILE *));
static void
-display_info PARAMS ((void));
+display_info PARAMS ((char *, int));
static void
do_one_display PARAMS ((struct display *));
static void
-undisplay_command PARAMS ((char *));
+undisplay_command PARAMS ((char *, int));
static void
free_display PARAMS ((struct display *));
fputs_filtered (leadin, stream);
fputs_filtered ("<", stream);
if (do_demangle)
- fputs_demangled (msymbol -> name, stream, 1);
+ fputs_demangled (msymbol -> name, stream, DMGL_ANSI | DMGL_PARAMS);
else
fputs_filtered (msymbol -> name, stream);
name_location = msymbol -> address;
{
exp++;
fmt = decode_format (&exp, 0, 0);
- validate_format (fmt, "print");
+ validate_format (fmt, "output");
format = fmt.format;
}
register struct symbol *sym;
register struct minimal_symbol *msymbol;
register long val;
+ register long basereg;
int is_a_field_of_this; /* C++: lookup_symbol sets this to nonzero
if exp is a field of `this'. */
printf ("Symbol \"%s\" is ", SYMBOL_NAME (sym));
val = SYMBOL_VALUE (sym);
+ basereg = SYMBOL_BASEREG (sym);
switch (SYMBOL_CLASS (sym))
{
break;
case LOC_ARG:
- printf ("an argument at offset %ld", val);
+ if (SYMBOL_BASEREG_VALID (sym))
+ {
+ printf ("an argument at offset %ld from register %s",
+ val, reg_names[basereg]);
+ }
+ else
+ {
+ printf ("an argument at offset %ld", val);
+ }
break;
case LOC_LOCAL_ARG:
- printf ("an argument at frame offset %ld", val);
+ if (SYMBOL_BASEREG_VALID (sym))
+ {
+ printf ("an argument at offset %ld from register %s",
+ val, reg_names[basereg]);
+ }
+ else
+ {
+ printf ("an argument at frame offset %ld", val);
+ }
break;
case LOC_LOCAL:
- printf ("a local variable at frame offset %ld", val);
+ if (SYMBOL_BASEREG_VALID (sym))
+ {
+ printf ("a local variable at offset %ld from register %s",
+ val, reg_names[basereg]);
+ }
+ else
+ {
+ printf ("a local variable at frame offset %ld", val);
+ }
break;
case LOC_REF_ARG:
{
exp++;
fmt = decode_format (&exp, last_format, last_size);
- last_size = fmt.size;
- last_format = fmt.format;
}
/* If we have an expression, evaluate it and use it as the address. */
do_examine (fmt, next_address);
+ /* If the examine succeeds, we remember its size and format for next time. */
+ last_size = fmt.size;
+ last_format = fmt.format;
+
/* Set a couple of internal variables if appropriate. */
if (last_examine_value)
{
free_display (d)
struct display *d;
{
- free (d->exp);
- free (d);
+ free ((PTR)d->exp);
+ free ((PTR)d);
}
/* Clear out the display_chain.
while (d = display_chain)
{
- free (d->exp);
+ free ((PTR)d->exp);
display_chain = d->next;
- free (d);
+ free ((PTR)d);
}
}
Specify the element numbers. */
static void
-undisplay_command (args)
+undisplay_command (args, from_tty)
char *args;
+ int from_tty;
{
register char *p = args;
register char *p1;
}
static void
-display_info ()
+display_info (ignore, from_tty)
+ char *ignore;
+ int from_tty;
{
register struct display *d;
}
static void
-enable_display (args)
+enable_display (args, from_tty)
char *args;
+ int from_tty;
{
register char *p = args;
register char *p1;