This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Fix pending breakpoint + asm layout tui crash
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Sun, 18 Jan 2009 17:09:41 +0000
- Subject: Fix pending breakpoint + asm layout tui crash
TUI would crash if there was a pending breakpoint (one without a location), and
a disassembly window was requested ('layout asm').
This fixes it. Checked in.
--
Pedro Alves
2009-01-18 Pedro Alves <pedro@codesourcery.com>
* tui/tui-winsource.c (tui_update_breakpoint_info): In asm layout,
skip breakpoints without a location (pending breakpoints).
---
gdb/tui/tui-winsource.c | 1 +
1 file changed, 1 insertion(+)
Index: src/gdb/tui/tui-winsource.c
===================================================================
--- src.orig/gdb/tui/tui-winsource.c 2009-01-18 15:55:50.000000000 +0000
+++ src/gdb/tui/tui-winsource.c 2009-01-18 16:19:13.000000000 +0000
@@ -441,6 +441,7 @@ tui_update_breakpoint_info (struct tui_w
&& bp->line_number == line->line_or_addr.u.line_no)
|| (win == TUI_DISASM_WIN
&& line->line_or_addr.loa == LOA_ADDRESS
+ && bp->loc != NULL
&& bp->loc->address == line->line_or_addr.u.addr))
{
if (bp->enable_state == bp_disabled)