diff options
author | Fred Fish <fnf@specifix.com> | 1992-06-29 23:34:38 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1992-06-29 23:34:38 +0000 |
commit | 51b57ded888cbdacb5ad126363f8ae6adc9541b6 (patch) | |
tree | 2e4f19add96d95001bd828328f309ca1b4a6b0a7 /gdb/symmisc.c | |
parent | 22fd4704bccdd29ab742445e9a4017e457ef449f (diff) | |
download | gdb-51b57ded888cbdacb5ad126363f8ae6adc9541b6.zip gdb-51b57ded888cbdacb5ad126363f8ae6adc9541b6.tar.gz gdb-51b57ded888cbdacb5ad126363f8ae6adc9541b6.tar.bz2 |
* dbxread.c, i386-pinsn.c, i386-tdep.c, regex.c, solib.c, symmisc.c,
symtab.h, tm-i386v4.h, valprint.c, values.c: Lint.
* breakpoint.c, c-exp.y, coffread.c, command.c, environ.c, eval.c,
findvar.c, infcmd.c, infptrace.c, infrun.c, m2-exp.y, parse.c,
putenv.c, solib.c, sparc-xdep.c, symtab.c, tm-i386v.h, tm-sparc.h,
utils.c, valarith.c, valops.c, valprint.c, values.c:
Replace bcopy() use with memcpy(), which is more standard and can
take advantage of gcc's builtin functions for increased performance.
* breakpoint.c, buildsym.c, coffread.c, dbxread.c, i386-tdep.c,
ieee-float.c, infcmd.c, sparc-tdep.c, stack.c, symtab.c, symtab.h,
target.c, values.c:
Replace bzero() use with memset(), which is more standard and can
take advantage of gcc's builtin functions for increased performance.
* i386-tdep.c, main.c, valprint.c:
Replace bcmp() use with memcmp(), which is more standard and can
take advantage of gcc's builtin functions for increased performance.
Diffstat (limited to 'gdb/symmisc.c')
-rw-r--r-- | gdb/symmisc.c | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/gdb/symmisc.c b/gdb/symmisc.c index a78b399..b460734 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -26,6 +26,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "breakpoint.h" #include "command.h" #include "obstack.h" +#include "language.h" #include <string.h> @@ -255,7 +256,7 @@ dump_psymtab (objfile, psymtab, outfile) psymtab -> filename); fprintf_filtered (outfile, "(object 0x%x)\n\n", psymtab); fprintf (outfile, " Read from object file %s (0x%x)\n", - objfile -> name, objfile); + objfile -> name, (unsigned int) objfile); if (psymtab -> readin) { @@ -299,7 +300,7 @@ dump_symtab (objfile, symtab, outfile) fprintf (outfile, "\nSymtab for file %s\n", symtab->filename); fprintf (outfile, "Read from object file %s (%x)\n", objfile->name, - objfile); + (unsigned int) objfile); fprintf (outfile, "Language: %s\n", language_str (symtab -> language)); /* First print the line table. */ @@ -320,10 +321,10 @@ dump_symtab (objfile, symtab, outfile) b = BLOCKVECTOR_BLOCK (bv, i); depth = block_depth (b) * 2; print_spaces (depth, outfile); - fprintf (outfile, "block #%03d (object 0x%x) ", i, b); + fprintf (outfile, "block #%03d (object 0x%x) ", i, (unsigned int) b); fprintf (outfile, "[0x%x..0x%x]", BLOCK_START (b), BLOCK_END (b)); if (BLOCK_SUPERBLOCK (b)) - fprintf (outfile, " (under 0x%x)", BLOCK_SUPERBLOCK (b)); + fprintf (outfile, " (under 0x%x)", (unsigned int) BLOCK_SUPERBLOCK (b)); if (BLOCK_FUNCTION (b)) fprintf (outfile, " %s", SYMBOL_NAME (BLOCK_FUNCTION (b))); fputc ('\n', outfile); @@ -461,12 +462,28 @@ print_symbol (symbol, depth, outfile) break; case LOC_ARG: - fprintf (outfile, "arg at 0x%lx,", SYMBOL_VALUE (symbol)); + if (SYMBOL_BASEREG_VALID (symbol)) + { + fprintf (outfile, "arg at 0x%lx from register %d,", + SYMBOL_VALUE (symbol), SYMBOL_BASEREG (symbol)); + } + else + { + fprintf (outfile, "arg at 0x%lx,", SYMBOL_VALUE (symbol)); + } break; case LOC_LOCAL_ARG: - fprintf (outfile, "arg at offset 0x%x from fp,", - SYMBOL_VALUE (symbol)); + if (SYMBOL_BASEREG_VALID (symbol)) + { + fprintf (outfile, "arg at offset 0x%lx from register %d,", + SYMBOL_VALUE (symbol), SYMBOL_BASEREG (symbol)); + } + else + { + fprintf (outfile, "arg at offset 0x%lx from fp,", + SYMBOL_VALUE (symbol)); + } case LOC_REF_ARG: fprintf (outfile, "reference arg at 0x%lx,", SYMBOL_VALUE (symbol)); @@ -477,7 +494,15 @@ print_symbol (symbol, depth, outfile) break; case LOC_LOCAL: - fprintf (outfile, "local at 0x%lx,", SYMBOL_VALUE (symbol)); + if (SYMBOL_BASEREG_VALID (symbol)) + { + fprintf (outfile, "local at 0x%lx from register %d", + SYMBOL_VALUE (symbol), SYMBOL_BASEREG (symbol)); + } + else + { + fprintf (outfile, "local at 0x%lx,", SYMBOL_VALUE (symbol)); + } break; case LOC_TYPEDEF: @@ -489,7 +514,7 @@ print_symbol (symbol, depth, outfile) case LOC_BLOCK: fprintf (outfile, "block (object 0x%x) starting at 0x%x,", - SYMBOL_BLOCK_VALUE (symbol), + (unsigned int) SYMBOL_BLOCK_VALUE (symbol), BLOCK_START (SYMBOL_BLOCK_VALUE (symbol))); break; |