diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-09-19 20:09:45 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-09-19 20:09:45 +0000 |
commit | b9fbf4340af8d0f7b0ecc3d549e9d5acc5b30e2b (patch) | |
tree | 0a744d8e5b8c46fa229604096fdb2dc426628010 /gdb/hppah-nat.c | |
parent | f6f87075ea61ae0107e95e2ddd56a174eea3a1d0 (diff) | |
download | gdb-b9fbf4340af8d0f7b0ecc3d549e9d5acc5b30e2b.zip gdb-b9fbf4340af8d0f7b0ecc3d549e9d5acc5b30e2b.tar.gz gdb-b9fbf4340af8d0f7b0ecc3d549e9d5acc5b30e2b.tar.bz2 |
2003-09-19 Andrew Cagney <cagney@redhat.com>
* config/pa/nm-hppah.h (NEED_TEXT_START_END): Delete.
(DEPRECATED_HPUX_TEXT_END): Define.
(deprecated_hpux_text_end): Declare.
(struct target_ops): Declare opaque.
* hppah-nat.c (text_end): Make static.
(deprecated_hpux_text_end): New function.
* exec.c (text_end): Delete global variable.
(NEED_TEXT_START_END): Do not define.
(exec_file_attach): Replace code computing "text_end" code with
call to DEPRECATED_HPUX_TEXT_END.
2003-09-19 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Delete
documentation for NEED_TEXT_START_END.
Diffstat (limited to 'gdb/hppah-nat.c')
-rw-r--r-- | gdb/hppah-nat.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/gdb/hppah-nat.c b/gdb/hppah-nat.c index 5359949..28ec350 100644 --- a/gdb/hppah-nat.c +++ b/gdb/hppah-nat.c @@ -34,14 +34,34 @@ #include "gdb_string.h" #include <signal.h> -extern CORE_ADDR text_end; - extern int hpux_has_forked (int pid, int *childpid); extern int hpux_has_vforked (int pid, int *childpid); extern int hpux_has_execd (int pid, char **execd_pathname); extern int hpux_has_syscall_event (int pid, enum target_waitkind *kind, int *syscall_id); +static CORE_ADDR text_end; + +void +deprecated_hpux_text_end (struct target_ops *exec_ops) +{ + struct section_table *p; + + /* Set text_end to the highest address of the end of any readonly + code section. */ + /* FIXME: The comment above does not match the code. The code + checks for sections with are either code *or* readonly. */ + text_end = (CORE_ADDR) 0; + for (p = exec_ops->to_sections; p < exec_ops->to_sections_end; p++) + if (bfd_get_section_flags (p->bfd, p->the_bfd_section) + & (SEC_CODE | SEC_READONLY)) + { + if (text_end < p->endaddr) + text_end = p->endaddr; + } +} + + static void fetch_register (int); void |