aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-11-29 15:39:51 +0000
committerAndrew Cagney <cagney@redhat.com>2002-11-29 15:39:51 +0000
commit805e2818d6d8eab9ceaf1754eda3ed59404ae39d (patch)
treebd66694a772c79c68f0dbef3f3a050cc3ad882d6 /gdb
parentfe67b6c54e516495cc6c4c12cd974feb03be5232 (diff)
downloadgdb-805e2818d6d8eab9ceaf1754eda3ed59404ae39d.zip
gdb-805e2818d6d8eab9ceaf1754eda3ed59404ae39d.tar.gz
gdb-805e2818d6d8eab9ceaf1754eda3ed59404ae39d.tar.bz2
2002-11-29 Andrew Cagney <ac131313@redhat.com>
* frame.h (get_selected_block): Add comments.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/frame.h26
2 files changed, 30 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 19f9ba3..472568b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2002-11-29 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.h (get_selected_block): Add comments.
+
2002-11-28 Andrew Cagney <ac131313@redhat.com>
* frame.c (pc_notcurrent): New function.
diff --git a/gdb/frame.h b/gdb/frame.h
index 202f9c8..98045c1 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -442,6 +442,32 @@ extern void get_frame_saved_regs (struct frame_info *,
extern struct block *get_frame_block (struct frame_info *,
CORE_ADDR *addr_in_block);
+/* Return the `struct block' that belongs to the selected thread's
+ selected frame. If the inferior has no state, return NULL.
+
+ NOTE: cagney/2002-11-29:
+
+ No state? Does the inferior have any execution state (a core file
+ does, an executable does not). At present the code tests
+ `target_has_stack' but I'm left wondering if it should test
+ `target_has_registers' or, even, a merged target_has_state.
+
+ Should it look at the most recently specified SAL? If the target
+ has no state, should this function try to extract a block from the
+ most recently selected SAL? That way `list foo' would give it some
+ sort of reference point. Then again, perhaphs that would confuse
+ things.
+
+ Calls to this function can be broken down into two categories: Code
+ that uses the selected block as an additional, but optional, data
+ point; Code that uses the selected block as a prop, when it should
+ have the relevant frame/block/pc explicitly passed in.
+
+ The latter can be eliminated by correctly parameterizing the code,
+ the former though is more interesting. Per the "address" command,
+ it occures in the CLI code and makes it possible for commands to
+ work, even when the inferior has no state. */
+
extern struct block *get_selected_block (CORE_ADDR *addr_in_block);
extern struct symbol *get_frame_function (struct frame_info *);