aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2010-02-03 16:43:03 +0000
committerH.J. Lu <hjl.tools@gmail.com>2010-02-03 16:43:03 +0000
commit75cebea968bbac3e5dccd256de4de0e8305990d0 (patch)
treef6f23162029513153a111d36fd8c13c1e0d3b99b /gdb/gdbarch.c
parentc1dec97bf174ee0e1f1e96e53d34a78b4a2d9a6a (diff)
downloadgdb-75cebea968bbac3e5dccd256de4de0e8305990d0.zip
gdb-75cebea968bbac3e5dccd256de4de0e8305990d0.tar.gz
gdb-75cebea968bbac3e5dccd256de4de0e8305990d0.tar.bz2
Add qsupported to gdbarch.
2010-02-03 H.J. Lu <hongjiu.lu@intel.com> * gdbarch.sh: Add qsupported. * gdbarch.c: Regenerated. * gdbarch.h: Likewise. * remote.c (remote_state): Add gdbarch. (init_remote_state): Set gdbarch. (remote_query_supported): Support gdbarch_qsupported.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 6448fc3..cfb042b 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -252,6 +252,7 @@ struct gdbarch
int has_global_breakpoints;
gdbarch_has_shared_address_space_ftype *has_shared_address_space;
gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at;
+ const char * qsupported;
};
@@ -395,6 +396,7 @@ struct gdbarch startup_gdbarch =
0, /* has_global_breakpoints */
default_has_shared_address_space, /* has_shared_address_space */
default_fast_tracepoint_valid_at, /* fast_tracepoint_valid_at */
+ 0, /* qsupported */
/* startup_gdbarch() */
};
@@ -661,6 +663,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of has_global_breakpoints, invalid_p == 0 */
/* Skip verify of has_shared_address_space, invalid_p == 0 */
/* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
+ /* Skip verify of qsupported, invalid_p == 0 */
buf = ui_file_xstrdup (log, &length);
make_cleanup (xfree, buf);
if (length > 0)
@@ -1035,6 +1038,9 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: push_dummy_code = <%s>\n",
host_address_to_string (gdbarch->push_dummy_code));
fprintf_unfiltered (file,
+ "gdbarch_dump: qsupported = %s\n",
+ gdbarch->qsupported);
+ fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_read_pc_p() = %d\n",
gdbarch_read_pc_p (gdbarch));
fprintf_unfiltered (file,
@@ -3576,6 +3582,23 @@ set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at;
}
+const char *
+gdbarch_qsupported (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ /* Skip verify of qsupported, invalid_p == 0 */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_qsupported called\n");
+ return gdbarch->qsupported;
+}
+
+void
+set_gdbarch_qsupported (struct gdbarch *gdbarch,
+ const char * qsupported)
+{
+ gdbarch->qsupported = qsupported;
+}
+
/* Keep a registry of per-architecture data-pointers required by GDB
modules. */