aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAli Anwar <alianwar@sourceware.org>2012-10-22 13:35:43 +0000
committerAli Anwar <alianwar@sourceware.org>2012-10-22 13:35:43 +0000
commit08af7a403c41a1622d08134141dd9d7a2405da3e (patch)
treed7cc6d3bbc07cc1879e9500f7c00aa2f69de095e /gdb
parent0e86e20e046ab38f95fb405f91a7b3a1ec7d7aba (diff)
downloadgdb-08af7a403c41a1622d08134141dd9d7a2405da3e.zip
gdb-08af7a403c41a1622d08134141dd9d7a2405da3e.tar.gz
gdb-08af7a403c41a1622d08134141dd9d7a2405da3e.tar.bz2
Ali Anwar <ali_anwar@codesourcery.com>
* gdbarch.sh (function_list): Use 'pstring' when printing a variable which could return NULL. * gdbarch.c: Regenerate.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/gdbarch.c16
-rwxr-xr-xgdb/gdbarch.sh16
3 files changed, 22 insertions, 16 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5258388..b77946c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2012-10-22 Ali Anwar <ali_anwar@codesourcery.com>
+
+ * gdbarch.sh (function_list): Use 'pstring' when printing
+ a variable which could return NULL.
+ * gdbarch.c: Regenerate.
+
2012-10-10 Joel Brobecker <brobecker@adacore.com>
Tom Tromey <tromey@redhat.com>
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index e4fe267..c920682 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -1315,16 +1315,16 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
host_address_to_string (gdbarch->stabs_argument_has_addr));
fprintf_unfiltered (file,
"gdbarch_dump: stap_gdb_register_prefix = %s\n",
- gdbarch->stap_gdb_register_prefix);
+ pstring (gdbarch->stap_gdb_register_prefix));
fprintf_unfiltered (file,
"gdbarch_dump: stap_gdb_register_suffix = %s\n",
- gdbarch->stap_gdb_register_suffix);
+ pstring (gdbarch->stap_gdb_register_suffix));
fprintf_unfiltered (file,
"gdbarch_dump: stap_integer_prefix = %s\n",
- gdbarch->stap_integer_prefix);
+ pstring (gdbarch->stap_integer_prefix));
fprintf_unfiltered (file,
"gdbarch_dump: stap_integer_suffix = %s\n",
- gdbarch->stap_integer_suffix);
+ pstring (gdbarch->stap_integer_suffix));
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
gdbarch_stap_is_single_operand_p (gdbarch));
@@ -1339,16 +1339,16 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
host_address_to_string (gdbarch->stap_parse_special_token));
fprintf_unfiltered (file,
"gdbarch_dump: stap_register_indirection_prefix = %s\n",
- gdbarch->stap_register_indirection_prefix);
+ pstring (gdbarch->stap_register_indirection_prefix));
fprintf_unfiltered (file,
"gdbarch_dump: stap_register_indirection_suffix = %s\n",
- gdbarch->stap_register_indirection_suffix);
+ pstring (gdbarch->stap_register_indirection_suffix));
fprintf_unfiltered (file,
"gdbarch_dump: stap_register_prefix = %s\n",
- gdbarch->stap_register_prefix);
+ pstring (gdbarch->stap_register_prefix));
fprintf_unfiltered (file,
"gdbarch_dump: stap_register_suffix = %s\n",
- gdbarch->stap_register_suffix);
+ pstring (gdbarch->stap_register_suffix));
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
gdbarch_static_transform_name_p (gdbarch));
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index c20b8ca..95355f9 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -809,10 +809,10 @@ M:LONGEST:get_syscall_number:ptid_t ptid:ptid
# \$10 ;; integer constant 10
#
# in this case, this prefix would be the character \`\$\'.
-v:const char *:stap_integer_prefix:::0:0::0:gdbarch->stap_integer_prefix
+v:const char *:stap_integer_prefix:::0:0::0:pstring (gdbarch->stap_integer_prefix)
# Suffix used to mark an integer constant on the architecture's assembly.
-v:const char *:stap_integer_suffix:::0:0::0:gdbarch->stap_integer_suffix
+v:const char *:stap_integer_suffix:::0:0::0:pstring (gdbarch->stap_integer_suffix)
# Prefix used to mark a register name on the architecture's assembly.
# For example, on x86 the register name is written as:
@@ -820,10 +820,10 @@ v:const char *:stap_integer_suffix:::0:0::0:gdbarch->stap_integer_suffix
# \%eax ;; register eax
#
# in this case, this prefix would be the character \`\%\'.
-v:const char *:stap_register_prefix:::0:0::0:gdbarch->stap_register_prefix
+v:const char *:stap_register_prefix:::0:0::0:pstring (gdbarch->stap_register_prefix)
# Suffix used to mark a register name on the architecture's assembly
-v:const char *:stap_register_suffix:::0:0::0:gdbarch->stap_register_suffix
+v:const char *:stap_register_suffix:::0:0::0:pstring (gdbarch->stap_register_suffix)
# Prefix used to mark a register indirection on the architecture's assembly.
# For example, on x86 the register indirection is written as:
@@ -834,7 +834,7 @@ v:const char *:stap_register_suffix:::0:0::0:gdbarch->stap_register_suffix
#
# Please note that we use the indirection prefix also for register
# displacement, e.g., \`4\(\%eax\)\' on x86.
-v:const char *:stap_register_indirection_prefix:::0:0::0:gdbarch->stap_register_indirection_prefix
+v:const char *:stap_register_indirection_prefix:::0:0::0:pstring (gdbarch->stap_register_indirection_prefix)
# Suffix used to mark a register indirection on the architecture's assembly.
# For example, on x86 the register indirection is written as:
@@ -845,7 +845,7 @@ v:const char *:stap_register_indirection_prefix:::0:0::0:gdbarch->stap_register_
#
# Please note that we use the indirection suffix also for register
# displacement, e.g., \`4\(\%eax\)\' on x86.
-v:const char *:stap_register_indirection_suffix:::0:0::0:gdbarch->stap_register_indirection_suffix
+v:const char *:stap_register_indirection_suffix:::0:0::0:pstring (gdbarch->stap_register_indirection_suffix)
# Prefix used to name a register using GDB's nomenclature.
#
@@ -853,10 +853,10 @@ v:const char *:stap_register_indirection_suffix:::0:0::0:gdbarch->stap_register_
# language (e.g., \`10\' is the 10th general-purpose register). However,
# inside GDB this same register has an \`r\' appended to its name, so the 10th
# register would be represented as \`r10\' internally.
-v:const char *:stap_gdb_register_prefix:::0:0::0:gdbarch->stap_gdb_register_prefix
+v:const char *:stap_gdb_register_prefix:::0:0::0:pstring (gdbarch->stap_gdb_register_prefix)
# Suffix used to name a register using GDB's nomenclature.
-v:const char *:stap_gdb_register_suffix:::0:0::0:gdbarch->stap_gdb_register_suffix
+v:const char *:stap_gdb_register_suffix:::0:0::0:pstring (gdbarch->stap_gdb_register_suffix)
# Check if S is a single operand.
#