aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2002-08-25 19:54:56 +0000
committerStephane Carrez <stcarrez@nerim.fr>2002-08-25 19:54:56 +0000
commitf8b6fe097041b68ce57e517d0e105e1aa0261992 (patch)
tree1b53b3da1f2a4d6539db7886f3c291630cd20c24
parent0510ab860e77735fe7dd64a9542f29916c2484ef (diff)
downloadgdb-f8b6fe097041b68ce57e517d0e105e1aa0261992.zip
gdb-f8b6fe097041b68ce57e517d0e105e1aa0261992.tar.gz
gdb-f8b6fe097041b68ce57e517d0e105e1aa0261992.tar.bz2
* tuiDisassem.c (tuiSetDisassemContent): Use breakpoint_here_p.
(_hasBreak): Remove.
-rw-r--r--gdb/tui/ChangeLog5
-rw-r--r--gdb/tui/tuiDisassem.c46
2 files changed, 7 insertions, 44 deletions
diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog
index ac71eee..a29d159 100644
--- a/gdb/tui/ChangeLog
+++ b/gdb/tui/ChangeLog
@@ -1,5 +1,10 @@
2002-08-25 Stephane Carrez <stcarrez@nerim.fr>
+ * tuiDisassem.c (tuiSetDisassemContent): Use breakpoint_here_p.
+ (_hasBreak): Remove.
+
+2002-08-25 Stephane Carrez <stcarrez@nerim.fr>
+
* tuiDisassem.c (tuiGetBeginAsmAddress): Use lookup_minimal_symbol
to find symbol address.
diff --git a/gdb/tui/tuiDisassem.c b/gdb/tui/tuiDisassem.c
index e3a19b3..23b2443 100644
--- a/gdb/tui/tuiDisassem.c
+++ b/gdb/tui/tuiDisassem.c
@@ -54,17 +54,6 @@
#include "tui-file.h"
-/*****************************************
-** STATIC LOCAL FUNCTIONS FORWARD DECLS **
-******************************************/
-
-static struct breakpoint *_hasBreak (CORE_ADDR);
-
-
-/*****************************************
-** PUBLIC FUNCTIONS **
-******************************************/
-
/*
** tuiSetDisassemContent().
** Function to set the disassembly window's content.
@@ -107,7 +96,6 @@ extern void strcat_address_numeric (CORE_ADDR, int, char *, int);
for (curLine = 0, pc = startAddr; (curLine < maxLines);)
{
TuiWinElementPtr element = (TuiWinElementPtr) disassemWin->generic.content[curLine];
- struct breakpoint *bp;
print_address (pc, gdb_dis_out);
@@ -137,11 +125,9 @@ extern void strcat_address_numeric (CORE_ADDR, int, char *, int);
element->whichElement.source.lineOrAddr.addr = pc;
element->whichElement.source.isExecPoint =
(pc == (CORE_ADDR) ((TuiWinElementPtr) locator->content[0])->whichElement.locator.addr);
- bp = _hasBreak (pc);
element->whichElement.source.hasBreak =
- (bp != (struct breakpoint *) NULL &&
- (!element->whichElement.source.isExecPoint ||
- (bp->disposition != disp_del || bp->hit_count <= 0)));
+ (breakpoint_here_p (pc) != no_breakpoint_here
+ && !element->whichElement.source.isExecPoint);
curLine++;
pc = newpc;
/* reset the buffer to empty */
@@ -301,31 +287,3 @@ tuiVerticalDisassemScroll (TuiScrollDirection scrollDirection,
return;
} /* tuiVerticalDisassemScroll */
-
-
-
-/*****************************************
-** STATIC LOCAL FUNCTIONS **
-******************************************/
-/*
- ** _hasBreak().
- ** Answer whether there is a break point at the input line in the
- ** source file indicated
- */
-static struct breakpoint *
-_hasBreak (CORE_ADDR addr)
-{
- struct breakpoint *bpWithBreak = (struct breakpoint *) NULL;
- struct breakpoint *bp;
- extern struct breakpoint *breakpoint_chain;
-
-
- for (bp = breakpoint_chain;
- (bp != (struct breakpoint *) NULL &&
- bpWithBreak == (struct breakpoint *) NULL);
- bp = bp->next)
- if (addr == bp->address)
- bpWithBreak = bp;
-
- return bpWithBreak;
-} /* _hasBreak */