* tui/tui-winsource.c (tui_update_breakpoint_info): In asm layout,
[binutils-gdb.git] / gdb / tui / tui-winsource.c
index 06c4777d06e178eb3358131fa8b192f97506da29..b93c2c9d6f26ded43100e03ef9cbf03d93ac629e 100644 (file)
@@ -1,7 +1,7 @@
 /* TUI display source/assembly window.
 
-   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007
-   Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008,
+   2009 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
@@ -9,7 +9,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -18,9 +18,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
 #include <ctype.h>
@@ -443,6 +441,7 @@ tui_update_breakpoint_info (struct tui_win_info *win,
                && 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)
@@ -451,7 +450,7 @@ tui_update_breakpoint_info (struct tui_win_info *win,
                 mode |= TUI_BP_ENABLED;
               if (bp->hit_count)
                 mode |= TUI_BP_HIT;
-              if (bp->cond)
+              if (bp->loc->cond)
                 mode |= TUI_BP_CONDITIONAL;
               if (bp->type == bp_hardware_breakpoint)
                 mode |= TUI_BP_HARDWARE;