aboutsummaryrefslogtreecommitdiff
path: root/gdb/maint.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2003-02-14 20:07:00 +0000
committerMark Kettenis <kettenis@gnu.org>2003-02-14 20:07:00 +0000
commitb0b1c2c0ebc1f12ddf52682d75c3dc7bcbbe55ca (patch)
tree387fba2c904d8dc5b70fe986310f9956a439f110 /gdb/maint.c
parent8f05cde5d3c5911f92f2fcb60c461cd8a719387f (diff)
downloadgdb-b0b1c2c0ebc1f12ddf52682d75c3dc7bcbbe55ca.zip
gdb-b0b1c2c0ebc1f12ddf52682d75c3dc7bcbbe55ca.tar.gz
gdb-b0b1c2c0ebc1f12ddf52682d75c3dc7bcbbe55ca.tar.bz2
* configure.in: Add check for _etext.
* maint.c (maintenance_set_profile_cmd): Use etext if _etext isn't available. * config.in, configure: regenerated.
Diffstat (limited to 'gdb/maint.c')
-rw-r--r--gdb/maint.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gdb/maint.c b/gdb/maint.c
index 3595e18..7bdb102 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -645,6 +645,14 @@ static int maintenance_profile_p;
#if defined (HAVE_MONSTARTUP) && defined (HAVE__MCLEANUP)
+#ifdef HAVE__ETEXT
+extern char _etext;
+#define TEXTEND &_etext
+#else
+extern char etext;
+#define TEXTEND &etext
+#endif
+
static int profiling_state;
static void
@@ -669,7 +677,6 @@ maintenance_set_profile_cmd (char *args, int from_tty, struct cmd_list_element *
static int profiling_initialized;
extern void monstartup (unsigned long, unsigned long);
- extern char _etext;
extern int main();
if (!profiling_initialized)
@@ -680,7 +687,7 @@ maintenance_set_profile_cmd (char *args, int from_tty, struct cmd_list_element *
/* "main" is now always the first function in the text segment, so use
its address for monstartup. */
- monstartup ((unsigned long) &main, (unsigned long) &_etext);
+ monstartup ((unsigned long) &main, (unsigned long) TEXTEND);
}
else
{