From 38fcd64c3aab38859abfe7bbef7ced8942bfa74d Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 6 Feb 2006 21:55:06 +0000 Subject: From Vladimir Prus : gdb/ * breakpoint.c (print_one_breakpoint): For MI-like UI, output fullname field. gdb/doc/ * gdb.texinfo (Breakpoint table commands): Document the fullname field in -break-list output. gdb/testsuite/ * gdb.mi/mi-break.exp, gdb.mi/mi2-break.exp: Test for the fullname field. --- gdb/breakpoint.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'gdb/breakpoint.c') diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 064762d..ddca4df 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -1,7 +1,7 @@ /* Everything about breakpoints, for GDB. Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, - 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of GDB. @@ -3506,6 +3506,16 @@ print_one_breakpoint (struct breakpoint *b, } ui_out_field_string (uiout, "file", b->source_file); ui_out_text (uiout, ":"); + + if (ui_out_is_mi_like_p (uiout)) + { + struct symtab_and_line sal = find_pc_line (b->loc->address, 0); + char *fullname = symtab_to_fullname (sal.symtab); + + if (fullname) + ui_out_field_string (uiout, "fullname", fullname); + } + ui_out_field_int (uiout, "line", b->line_number); } else if (b->pending) -- cgit v1.1