This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 40/40] Document breakpoints / linespec & co improvements (manual + NEWS)


	* NEWS: Mention breakpoints, linespecs and explicit locations
	improvements.

gdb/doc/ChangeLog:
yyyy-mm-dd  Pedro Alves  <palves@redhat.com>

	* gdb.texinfo (Linespec Locations): Document how "function" is
	interpreted in C++.
	(Explicit Locations): Document how "-function" is interpreted in
	C++.  Document -qualified.
---
 gdb/doc/gdb.texinfo | 26 ++++++++++++++++++++++++++
 gdb/NEWS            | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+)

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 9fb70f6..59469e0 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -7845,6 +7845,16 @@ name of @file{/build/trunk/gcc/expr.c}, but not
 Specifies the line that begins the body of the function @var{function}.
 For example, in C, this is the line with the open brace.
 
+For C@t{++}, @var{function} is interpreted as specifying all functions
+named @var{function} ignoring missing leading specifiers (namespaces
+and classes).
+
+For example, assuming a program with symbols named @code{A::B::func}
+and @code{B::func}, both commands @code{break func} and @code{break
+B::func} set a breakpoint on both symbols.  To override this, you can
+use the explicit location option @code{-qualified}.  @xref{Explicit
+Locations}.
+
 @item @var{function}:@var{label}
 Specifies the line where @var{label} appears in @var{function}.
 
@@ -7909,6 +7919,22 @@ on function locations unmodified by other options (such as @code{-label}
 or @code{-line}) refer to the line that begins the body of the function.
 In C, for example, this is the line with the open brace.
 
+For C@t{++}, @var{function} is interpreted as specifying all functions
+named @var{function} ignoring missing leading specifiers (namespaces
+and classes).
+
+For example, assuming a program with symbols named @code{A::B::func}
+and @code{B::func}, both commands @code{break -function func} and
+@code{break -function B::func} set a breakpoint on both symbols.
+
+@item -qualified @var{function}
+Like @code{-function}, but the value specifies a fully qualified name
+of a function.
+
+For example, assuming a C@t{++} program with symbols named
+@code{A::B::func} and @code{B::func}, the @code{break -qualified
+B::func} command sets a breakpoint on @code{B::func}, only.
+
 @item -label @var{label}
 The value specifies the name of a label.  When the function
 name is not specified, the label is searched in the function of the currently
diff --git a/gdb/NEWS b/gdb/NEWS
index 112aa2f..6f9ade0 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,6 +3,42 @@
 
 *** Changes since GDB 8.0
 
+* Breakpoints / linespecs / explicit locations improvements
+
+  ** Breakpoints on C++ functions change
+
+    By default, breakpoints on functions are now interpreted as
+    specifying all functions with the given name ignoring missing
+    leading specifiers (namespaces and classes).
+
+    For example, assuming a C++ program with symbols named:
+
+      A::B::func
+      B::func
+
+    both commands "break func" and "break B::func" set a breakpoint on
+    both symbols.  The explicit location option "-function" was
+    changed accordingly.
+
+    To override this, you can specify an explicitly fully qualified
+    name, usign the new explicit location option "-qualified".  For
+    example, using the same C++ program, the "break -qualified
+    B::func" command sets a breakpoint on "B::func", only.
+
+  ** GDB now has a much improved linespec and explicit locations TAB
+     completion support, that better understands what you're
+     completing and offers better suggestions.
+
+  ** GDB can now complete function parameters in linespecs and
+     explicit locations, even without quoting.  When setting
+     breakpoints, quoting around functions names to help with
+     TAB-completion is generally no longer necessary.
+
+  ** GDB can now TAB-complete label symbol names.
+
+  ** GDB can now set breakpoints functions marked with [abi:cxx11]
+     tags.
+
 *** Changes in GDB 8.0
 
 * GDB now supports access to the PKU register on GNU/Linux. The register is
-- 
2.5.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]