aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-09-13 07:22:01 +0000
committerJohn Gilmore <gnu@cygnus>1991-09-13 07:22:01 +0000
commit7730bd5acd72be89de4d1d5a956d46e691c8b745 (patch)
tree5f957054c6cfef011efb464de73a14b97ff6fc92 /gdb
parentf74ff50fabdbee184c32a668bf62f8fa42926739 (diff)
downloadgdb-7730bd5acd72be89de4d1d5a956d46e691c8b745.zip
gdb-7730bd5acd72be89de4d1d5a956d46e691c8b745.tar.gz
gdb-7730bd5acd72be89de4d1d5a956d46e691c8b745.tar.bz2
* exec.c (exec_command): If NEED_TEXT_START_END, define the
variables and set them based on the exec file. * am29k-tdep.c: declare text_start. * valops.c (call_function_by_hand): declare text_end.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/am29k-tdep.c2
-rw-r--r--gdb/exec.c19
2 files changed, 21 insertions, 0 deletions
diff --git a/gdb/am29k-tdep.c b/gdb/am29k-tdep.c
index 33d16c8..ce1fa85 100644
--- a/gdb/am29k-tdep.c
+++ b/gdb/am29k-tdep.c
@@ -27,6 +27,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "symtab.h"
#include "inferior.h"
+extern CORE_ADDR text_start; /* FIXME, kludge... */
+
/* Structure to hold cached info about function prologues. */
struct prologue_info
{
diff --git a/gdb/exec.c b/gdb/exec.c
index c478e9c..5f8f398 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -50,6 +50,13 @@ bfd *exec_bfd = NULL;
int write_files = 0;
+/* Text start and end addresses (KLUDGE) if needed */
+
+#if NEED_TEXT_START_END
+CORE_ADDR text_start = 0;
+CORE_ADDR text_end = 0;
+#endif
+
/* Forward decl */
extern struct target_ops exec_ops;
@@ -137,6 +144,18 @@ exec_file_command (filename, from_tty)
error ("Can't find the file sections in `%s': %s",
exec_bfd->filename, bfd_errmsg (bfd_error));
+#if NEED_TEXT_START_END
+ /* This is a KLUDGE (FIXME) because a few places in a few ports
+ (29K springs to mind) need this info for now. */
+ {
+ struct section_table *p;
+ for (p = exec_ops.sections; p < exec_ops.sections_end; p++)
+ if (!strcmp (".text", bfd_section_name (p->bfd, p->sec_ptr))
+ text_start = p->addr;
+ text_end = p->endaddr;
+ }
+#endif
+
validate_files ();
push_target (&exec_ops);