aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2002-08-25 19:19:50 +0000
committerStephane Carrez <stcarrez@nerim.fr>2002-08-25 19:19:50 +0000
commit1f393769d4d0ac2ccf84cd57bef7c8f9bc7a08d7 (patch)
tree0dd1d6b8ee590ff72598d0acdb398b7d6d73d252 /gdb/tui
parentd2c6833eda0aeb1e4a5649f5717ab7c96098b95a (diff)
downloadgdb-1f393769d4d0ac2ccf84cd57bef7c8f9bc7a08d7.zip
gdb-1f393769d4d0ac2ccf84cd57bef7c8f9bc7a08d7.tar.gz
gdb-1f393769d4d0ac2ccf84cd57bef7c8f9bc7a08d7.tar.bz2
* tuiSourceWin.c (tui_display_main): Rename from tuiDisplayMainFunction
and use tuiGetBeginAsmAddress. * tuiSourceWin.h (tui_display_main): Declare. * tui.h (tuiDisplayMainFunction): Remove. * tui-hooks.c (tui_new_objfile_hook): Update.
Diffstat (limited to 'gdb/tui')
-rw-r--r--gdb/tui/ChangeLog8
-rw-r--r--gdb/tui/tui-hooks.c4
-rw-r--r--gdb/tui/tui.h1
-rw-r--r--gdb/tui/tuiSourceWin.c21
-rw-r--r--gdb/tui/tuiSourceWin.h3
5 files changed, 14 insertions, 23 deletions
diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog
index f991ac5..dc04b1f 100644
--- a/gdb/tui/ChangeLog
+++ b/gdb/tui/ChangeLog
@@ -1,5 +1,13 @@
2002-08-25 Stephane Carrez <stcarrez@nerim.fr>
+ * tuiSourceWin.c (tui_display_main): Rename from tuiDisplayMainFunction
+ and use tuiGetBeginAsmAddress.
+ * tuiSourceWin.h (tui_display_main): Declare.
+ * tui.h (tuiDisplayMainFunction): Remove.
+ * tui-hooks.c (tui_new_objfile_hook): Update.
+
+2002-08-25 Stephane Carrez <stcarrez@nerim.fr>
+
* tuiSource.h (m_tuiShowSourceAsIs): Remove macro.
(tuiShowSourceAsIs): Don't declare.
diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c
index 48eeeda..d605194 100644
--- a/gdb/tui/tui-hooks.c
+++ b/gdb/tui/tui-hooks.c
@@ -71,9 +71,7 @@ static void
tui_new_objfile_hook (struct objfile* objfile)
{
if (tui_active)
- {
- tuiDisplayMainFunction ();
- }
+ tui_display_main ();
if (tui_target_new_objfile_chain)
tui_target_new_objfile_chain (objfile);
diff --git a/gdb/tui/tui.h b/gdb/tui/tui.h
index b2ed4aa..9cc538d 100644
--- a/gdb/tui/tui.h
+++ b/gdb/tui/tui.h
@@ -125,7 +125,6 @@ extern void tui_vStartNewLines (va_list);
extern TuiStatus tui_set_layout (const char *);
/* tuiSourceWin.c */
-extern void tuiDisplayMainFunction (void);
extern void tuiUpdateAllExecInfos (void);
extern void tui_vAllSetHasBreakAt (va_list);
extern void tui_vUpdateSourceWindowsWithAddr (va_list);
diff --git a/gdb/tui/tuiSourceWin.c b/gdb/tui/tuiSourceWin.c
index 73090c7..95b6cdf 100644
--- a/gdb/tui/tuiSourceWin.c
+++ b/gdb/tui/tuiSourceWin.c
@@ -56,30 +56,15 @@
#include "tuiDisassem.h"
-/*****************************************
-** EXTERNAL FUNCTION DECLS **
-******************************************/
-
-/*****************************************
-** EXTERNAL DATA DECLS **
-******************************************/
-extern int current_source_line;
-extern struct symtab *current_source_symtab;
-
-/*
- ** tuiDisplayMainFunction().
- ** Function to display the "main" routine"
- */
+/* Function to display the "main" routine. */
void
-tuiDisplayMainFunction (void)
+tui_display_main (void)
{
if ((sourceWindows ())->count > 0)
{
CORE_ADDR addr;
- addr = parse_and_eval_address ("main");
- if (addr == (CORE_ADDR) 0)
- addr = parse_and_eval_address ("MAIN");
+ addr = tuiGetBeginAsmAddress ();
if (addr != (CORE_ADDR) 0)
{
struct symtab_and_line sal;
diff --git a/gdb/tui/tuiSourceWin.h b/gdb/tui/tuiSourceWin.h
index b8c20c8..803cb90 100644
--- a/gdb/tui/tuiSourceWin.h
+++ b/gdb/tui/tuiSourceWin.h
@@ -22,7 +22,8 @@
#ifndef _TUI_SOURCEWIN_H
#define _TUI_SOURCEWIN_H
-extern void tuiDisplayMainFunction (void);
+/* Function to display the "main" routine. */
+extern void tui_display_main (void);
extern void tuiUpdateSourceWindow (TuiWinInfoPtr, struct symtab *, TuiLineOrAddress,
int);
extern void tuiUpdateSourceWindowAsIs (TuiWinInfoPtr, struct symtab *, TuiLineOrAddress,