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.
This commit is contained in:
parent
73c1d57e3e
commit
1527aea867
@ -1,3 +1,12 @@
|
|||||||
|
2013-07-19 Yao Qi <yao@codesourcery.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2013-07-18 Yao Qi <yao@codesourcery.com>
|
2013-07-18 Yao Qi <yao@codesourcery.com>
|
||||||
|
|
||||||
* coffread.c (coff_symfile_read): Iterate over minimal symbols,
|
* coffread.c (coff_symfile_read): Iterate over minimal symbols,
|
||||||
|
@ -962,7 +962,7 @@ update_current_target (void)
|
|||||||
tcomplain);
|
tcomplain);
|
||||||
de_fault (to_traceframe_info,
|
de_fault (to_traceframe_info,
|
||||||
(struct traceframe_info * (*) (void))
|
(struct traceframe_info * (*) (void))
|
||||||
tcomplain);
|
return_zero);
|
||||||
de_fault (to_supports_evaluation_of_breakpoint_conditions,
|
de_fault (to_supports_evaluation_of_breakpoint_conditions,
|
||||||
(int (*) (void))
|
(int (*) (void))
|
||||||
return_zero);
|
return_zero);
|
||||||
|
15
gdb/target.h
15
gdb/target.h
@ -854,9 +854,18 @@ struct target_ops
|
|||||||
(const char *id);
|
(const char *id);
|
||||||
|
|
||||||
/* Return a traceframe info object describing the current
|
/* Return a traceframe info object describing the current
|
||||||
traceframe's contents. This method should not cache data;
|
traceframe's contents. If the target doesn't support
|
||||||
higher layers take care of caching, invalidating, and
|
traceframe info, return NULL. If the current traceframe is not
|
||||||
re-fetching when necessary. */
|
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);
|
struct traceframe_info *(*to_traceframe_info) (void);
|
||||||
|
|
||||||
/* Ask the target to use or not to use agent according to USE. Return 1
|
/* Ask the target to use or not to use agent according to USE. Return 1
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2013-07-19 Yao Qi <yao@codesourcery.com>
|
||||||
|
|
||||||
|
* gdb.trace/read-memory.exp (test_from_remote): Update test.
|
||||||
|
(teset_from_exec): Likewise.
|
||||||
|
|
||||||
2013-07-19 Yao Qi <yao@codesourcery.com>
|
2013-07-19 Yao Qi <yao@codesourcery.com>
|
||||||
|
|
||||||
* gdb.trace/read-memory.c: New.
|
* gdb.trace/read-memory.c: New.
|
||||||
|
@ -103,9 +103,8 @@ proc test_from_remote { target } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
with_test_prefix "w/o setting traceframe" {
|
with_test_prefix "w/o setting traceframe" {
|
||||||
gdb_test "print testglob" "Cannot access memory at address.*"
|
gdb_test "print testglob" " = <unavailable>"
|
||||||
gdb_test "print testglob_not_collected" \
|
gdb_test "print testglob_not_collected" " = <unavailable>"
|
||||||
"Cannot access memory at address.*"
|
|
||||||
gdb_test "print constglob" " = 10000"
|
gdb_test "print constglob" " = 10000"
|
||||||
gdb_test "print constglob_not_collected" " = 100"
|
gdb_test "print constglob_not_collected" " = 100"
|
||||||
}
|
}
|
||||||
@ -140,9 +139,8 @@ proc teset_from_exec { target } {
|
|||||||
"change to ${target} target"
|
"change to ${target} target"
|
||||||
|
|
||||||
with_test_prefix "exec to ${target} w/o setting traceframe" {
|
with_test_prefix "exec to ${target} w/o setting traceframe" {
|
||||||
gdb_test "print testglob" "Cannot access memory at address.*"
|
gdb_test "print testglob" " = <unavailable>"
|
||||||
gdb_test "print testglob_not_collected" \
|
gdb_test "print testglob_not_collected" " = <unavailable>"
|
||||||
"Cannot access memory at address.*"
|
|
||||||
gdb_test "print constglob" " = 10000"
|
gdb_test "print constglob" " = 10000"
|
||||||
gdb_test "print constglob_not_collected" " = 100"
|
gdb_test "print constglob_not_collected" " = 100"
|
||||||
}
|
}
|
||||||
|
@ -955,8 +955,7 @@ read_value_memory (struct value *val, int embedded_offset,
|
|||||||
{
|
{
|
||||||
VEC(mem_range_s) *available_memory;
|
VEC(mem_range_s) *available_memory;
|
||||||
|
|
||||||
if (get_traceframe_number () < 0
|
if (!traceframe_available_memory (&available_memory, memaddr, length))
|
||||||
|| !traceframe_available_memory (&available_memory, memaddr, length))
|
|
||||||
{
|
{
|
||||||
if (stack)
|
if (stack)
|
||||||
read_stack (memaddr, buffer, length);
|
read_stack (memaddr, buffer, length);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user