diff options
author | Markus Deuling <deuling@de.ibm.com> | 2008-05-23 04:31:40 +0000 |
---|---|---|
committer | Markus Deuling <deuling@de.ibm.com> | 2008-05-23 04:31:40 +0000 |
commit | 50ee75353252ec07aa1f062a2b409a2f6eb0d48d (patch) | |
tree | 057e55d93271c95eb756cb7967b455aafd14156b | |
parent | d44e847372bc71608d46402a65034c8d40ba2e80 (diff) | |
download | gdb-50ee75353252ec07aa1f062a2b409a2f6eb0d48d.zip gdb-50ee75353252ec07aa1f062a2b409a2f6eb0d48d.tar.gz gdb-50ee75353252ec07aa1f062a2b409a2f6eb0d48d.tar.bz2 |
* annotate.c (annotate_source, annotate_frame_begin): Replace
deprecated_print_address_numeric with paddress.
* cli/cli-cmds.c (list_command, edit_command): Likewise.
* tui/tui-stack.c (tui_make_status_line): Likewise.
* defs.h (deprecated_print_address_numeric): Remove.
* printcmd.c (deprecated_print_address_numeric): Remove.
* maint.c (maint_print_section_info): Fix comment.
-rw-r--r-- | gdb/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/annotate.c | 13 | ||||
-rw-r--r-- | gdb/cli/cli-cmds.c | 32 | ||||
-rw-r--r-- | gdb/defs.h | 4 | ||||
-rw-r--r-- | gdb/maint.c | 3 | ||||
-rw-r--r-- | gdb/printcmd.c | 17 | ||||
-rw-r--r-- | gdb/tui/tui-stack.c | 2 |
7 files changed, 27 insertions, 55 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 28de7ba..0010275 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,16 @@ 2008-05-23 Markus Deuling <deuling@de.ibm.com> + * annotate.c (annotate_source, annotate_frame_begin): Replace + deprecated_print_address_numeric with paddress. + * cli/cli-cmds.c (list_command, edit_command): Likewise. + * tui/tui-stack.c (tui_make_status_line): Likewise. + + * defs.h (deprecated_print_address_numeric): Remove. + * printcmd.c (deprecated_print_address_numeric): Remove. + * maint.c (maint_print_section_info): Fix comment. + +2008-05-23 Markus Deuling <deuling@de.ibm.com> + * valprint.c (print_hex_chars, print_octal_chars, print_decimal_chars, print_binary_chars, print_char_chars): Add byte_order parameter and replace gdbarch_byte_order. diff --git a/gdb/annotate.c b/gdb/annotate.c index 9494ee0..ee9adfa 100644 --- a/gdb/annotate.c +++ b/gdb/annotate.c @@ -427,22 +427,15 @@ annotate_source (char *filename, int line, int character, int mid, CORE_ADDR pc) else printf_filtered (("\032\032")); - printf_filtered (("%s:%d:%d:%s:0x"), filename, - line, character, - mid ? "middle" : "beg"); - deprecated_print_address_numeric (pc, 0, gdb_stdout); - printf_filtered (("\n")); + printf_filtered (("%s:%d:%d:%s:%s\n"), filename, line, character, + mid ? "middle" : "beg", paddress (pc)); } void annotate_frame_begin (int level, CORE_ADDR pc) { if (annotation_level > 1) - { - printf_filtered (("\n\032\032frame-begin %d 0x"), level); - deprecated_print_address_numeric (pc, 0, gdb_stdout); - printf_filtered (("\n")); - } + printf_filtered (("\n\032\032frame-begin %d %s\n"), level, paddress (pc)); } void diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index 3cde3fc..b0f5fa0 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -668,18 +668,12 @@ edit_command (char *arg, int from_tty) hex_string ((unsigned long) sal.pc)); sym = find_pc_function (sal.pc); if (sym) - { - deprecated_print_address_numeric (sal.pc, 1, gdb_stdout); - printf_filtered (" is in "); - fputs_filtered (SYMBOL_PRINT_NAME (sym), gdb_stdout); - printf_filtered (" (%s:%d).\n", sal.symtab->filename, sal.line); - } + printf_filtered ("%s is in %s (%s:%d).\n", paddress (sal.pc), + SYMBOL_PRINT_NAME (sym), sal.symtab->filename, + sal.line); else - { - deprecated_print_address_numeric (sal.pc, 1, gdb_stdout); - printf_filtered (" is at %s:%d.\n", - sal.symtab->filename, sal.line); - } + printf_filtered ("%s is at %s:%d.\n", paddress (sal.pc), + sal.symtab->filename, sal.line); } /* If what was given does not imply a symtab, it must be an undebuggable @@ -838,18 +832,12 @@ list_command (char *arg, int from_tty) hex_string ((unsigned long) sal.pc)); sym = find_pc_function (sal.pc); if (sym) - { - deprecated_print_address_numeric (sal.pc, 1, gdb_stdout); - printf_filtered (" is in "); - fputs_filtered (SYMBOL_PRINT_NAME (sym), gdb_stdout); - printf_filtered (" (%s:%d).\n", sal.symtab->filename, sal.line); - } + printf_filtered ("%s is in %s (%s:%d).\n", + paddress (sal.pc), SYMBOL_PRINT_NAME (sym), + sal.symtab->filename, sal.line); else - { - deprecated_print_address_numeric (sal.pc, 1, gdb_stdout); - printf_filtered (" is at %s:%d.\n", - sal.symtab->filename, sal.line); - } + printf_filtered ("%s is at %s:%d.\n", paddress (sal.pc), + sal.symtab->filename, sal.line); } /* If line was not specified by just a line number, @@ -479,7 +479,7 @@ extern char *paddr_nz (CORE_ADDR addr); extern char *paddr_u (CORE_ADDR addr); extern char *paddr_d (LONGEST addr); -/* Like 0x%lx, replaces deprecated_print_address_numeric. */ +/* Like 0x%lx. */ extern const char *paddress (CORE_ADDR addr); extern char *phex (ULONGEST l, int sizeof_l); @@ -565,8 +565,6 @@ extern int build_address_symbolic (CORE_ADDR addr, int *line, int *unmapped); -extern void deprecated_print_address_numeric (CORE_ADDR, int, struct ui_file *); - extern void print_address (CORE_ADDR, struct ui_file *); /* From source.c */ diff --git a/gdb/maint.c b/gdb/maint.c index ea27825..ac38930 100644 --- a/gdb/maint.c +++ b/gdb/maint.c @@ -306,8 +306,7 @@ maint_print_section_info (const char *name, flagword flags, CORE_ADDR addr, CORE_ADDR endaddr, unsigned long filepos) { - /* FIXME-32x64: Need deprecated_print_address_numeric with field - width. */ + /* FIXME-32x64: Need paddress with field width. */ printf_filtered (" 0x%s", paddr (addr)); printf_filtered ("->0x%s", paddr (endaddr)); printf_filtered (" at %s", diff --git a/gdb/printcmd.c b/gdb/printcmd.c index b63fbc1..ad94018 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -676,23 +676,6 @@ build_address_symbolic (CORE_ADDR addr, /* IN */ return 0; } -/* Print address ADDR on STREAM. USE_LOCAL means the same thing as for - print_longest. */ -void -deprecated_print_address_numeric (CORE_ADDR addr, int use_local, - struct ui_file *stream) -{ - if (use_local) - fputs_filtered (paddress (addr), stream); - else - { - int addr_bit = gdbarch_addr_bit (current_gdbarch); - - if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT)) - addr &= ((CORE_ADDR) 1 << addr_bit) - 1; - print_longest (stream, 'x', 0, (ULONGEST) addr); - } -} /* Print address ADDR symbolically on STREAM. First print it as a number. Then perhaps print diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c index 241a273..40087b7 100644 --- a/gdb/tui/tui-stack.c +++ b/gdb/tui/tui-stack.c @@ -102,7 +102,7 @@ tui_make_status_line (struct tui_locator_element *loc) /* Translate PC address. */ pc_out = tui_sfileopen (128); - deprecated_print_address_numeric (loc->addr, 1, pc_out); + fputs_filtered (paddress (loc->addr), pc_out); pc_buf = tui_file_get_strbuf (pc_out); pc_width = strlen (pc_buf); |