summaryrefslogtreecommitdiff
path: root/gdb/target.h
diff options
context:
space:
mode:
authorqiyao <qiyao>2013-07-18 23:09:48 +0000
committerqiyao <qiyao>2013-07-18 23:09:48 +0000
commitcc3c9e5f2bf4c0b64cfc7f4a9af1921c8c0298c2 (patch)
tree375cbd628c4746fcd0e37d10b9012a8a6a3c4f1c /gdb/target.h
parent5f3c083af079e3d88299015866a6d2c612ec677d (diff)
downloadgdb-cc3c9e5f2bf4c0b64cfc7f4a9af1921c8c0298c2.tar.gz
gdb/
* target.c (update_current_target): Change the default action of 'to_traceframe_info' from tcomplain to return_zero. * target.h (struct target_ops) <to_traceframe_info>: Add more comments. * valops.c (read_value_memory): Call traceframe_available_memory unconditionally. gdb/testsuite/ * gdb.trace/read-memory.exp (test_from_remote): Update test. (teset_from_exec): Likewise.
Diffstat (limited to 'gdb/target.h')
-rw-r--r--gdb/target.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/gdb/target.h b/gdb/target.h
index 2ba85d9f70d..21e5792ad78 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -854,9 +854,18 @@ struct target_ops
(const char *id);
/* Return a traceframe info object describing the current
- traceframe's contents. This method should not cache data;
- higher layers take care of caching, invalidating, and
- re-fetching when necessary. */
+ traceframe's contents. If the target doesn't support
+ traceframe info, return NULL. If the current traceframe is not
+ selected (the current traceframe number is -1), the target can
+ choose to return either NULL or an empty traceframe info. If
+ NULL is returned, for example in remote target, GDB will read
+ from the live inferior. If an empty traceframe info is
+ returned, for example in tfile target, which means the
+ traceframe info is available, but the requested memory is not
+ available in it. GDB will try to see if the requested memory
+ is available in the read-only sections. This method should not
+ cache data; higher layers take care of caching, invalidating,
+ and re-fetching when necessary. */
struct traceframe_info *(*to_traceframe_info) (void);
/* Ask the target to use or not to use agent according to USE. Return 1