Go to file
Andrew Burgess 2698da268b gdb: add SYMBOL_LOOKUP_SCOPED_DEBUG_ENTER_EXIT
After the previous commit converted symbol-lookup debug to use the new
debug scheme, this commit adds SYMBOL_LOOKUP_SCOPED_DEBUG_ENTER_EXIT.

The previous commit didn't add SYMBOL_LOOKUP_SCOPED_DEBUG_ENTER_EXIT
because symbol-lookup debug is controlled by an 'unsigned int' rather
than a 'bool' control variable, we use the numeric value to offer
different levels of verbosity for symbol-lookup debug.

The *_SCOPED_DEBUG_ENTER_EXIT mechanism currently relies on capturing
a reference to the bool control variable, and evaluating the variable
both on entry, and at exit, this is done in the scoped_debug_start_end
class (see gdbsupport/common-debug.h).

This commit templates scoped_debug_start_end so that the class can
accept either a 'bool &' or an invokable object, e.g. a lambda
function, or a function pointer.

The existing scoped_debug_start_end and scoped_debug_enter_exit macros
in common-debug.h are updated to support scoped_debug_enter_exit being
templated, however, nothing outside of common-debug.h needs to change.

I've then added SYMBOL_LOOKUP_SCOPED_DEBUG_ENTER_EXIT in symtab.h, and
added a couple of token uses in symtab.c.  I didn't want to add too
much in this first commit, this is really about updating
common-debug.h to support this new functionality.

Within symtab.h I created a couple of global functions that can be
used to query the status of the symbol_lookup_debug control variable,
these functions are then used within the two existing macros:

  symbol_lookup_debug_printf
  symbol_lookup_debug_printf_v

and also in the new SYMBOL_LOOKUP_SCOPED_DEBUG_ENTER_EXIT macro.
2022-12-14 10:56:47 +00:00
bfd ld, gold: remove support for -z bndplt (MPX prefix) 2022-12-14 08:48:13 +01:00
binutils asan: signed integer overflow in display_debug_frames 2022-12-14 13:07:43 +10:30
config
contrib
cpu
elfcpp
etc
gas RISC-V: Add string length check for operands in AS 2022-12-14 17:23:12 +08:00
gdb gdb: add SYMBOL_LOOKUP_SCOPED_DEBUG_ENTER_EXIT 2022-12-14 10:56:47 +00:00
gdbserver [aarch64] Add TPIDR2 register support for Linux 2022-12-09 13:41:15 +00:00
gdbsupport gdb: add SYMBOL_LOOKUP_SCOPED_DEBUG_ENTER_EXIT 2022-12-14 10:56:47 +00:00
gnulib
gold ld, gold: remove support for -z bndplt (MPX prefix) 2022-12-14 08:48:13 +01:00
gprof
gprofng gprofng: remove unused gprofng/src/DbeSession.cc.1 2022-11-28 20:52:10 -08:00
include libsframe: rename API sframe_fde_func_info to sframe_fde_create_func_info 2022-12-09 10:25:31 -08:00
intl
ld ld, gold: remove support for -z bndplt (MPX prefix) 2022-12-14 08:48:13 +01:00
libbacktrace testsuite: support mold linker 2022-12-05 15:52:51 +01:00
libctf libctf: remove unnecessary zstd constructs 2022-12-12 10:53:39 -08:00
libdecnumber
libiberty
libsframe libsframe: rename API sframe_fde_func_info to sframe_fde_create_func_info 2022-12-09 10:25:31 -08:00
opcodes x86: further re-work insn/suffix recognition to also cover MOVSX 2022-12-12 14:01:02 +01:00
readline
sim
texinfo
zlib
.cvsignore
.editorconfig
.gitattributes
.gitignore
ar-lib
ChangeLog
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.LIBGLOSS
COPYING.NEWLIB
depcomp
djunpack.bat
install-sh
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS
Makefile.def
Makefile.in
Makefile.tpl
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
README-maintainer-mode
setup.com
src-release.sh src-release.sh: Fix gdb source tarball build failure due to libsframe 2022-11-30 07:32:58 +04:00
symlink-tree
test-driver
ylwrap

		   README for GNU development tools

This directory contains various GNU compilers, assemblers, linkers, 
debuggers, etc., plus their support routines, definitions, and documentation.

If you are receiving this as part of a GDB release, see the file gdb/README.
If with a binutils release, see binutils/README;  if with a libg++ release,
see libg++/README, etc.  That'll give you info about this
package -- supported targets, how to use it, how to report bugs, etc.

It is now possible to automatically configure and build a variety of
tools with one command.  To build all of the tools contained herein,
run the ``configure'' script here, e.g.:

	./configure 
	make

To install them (by default in /usr/local/bin, /usr/local/lib, etc),
then do:
	make install

(If the configure script can't determine your type of computer, give it
the name as an argument, for instance ``./configure sun4''.  You can
use the script ``config.sub'' to test whether a name is recognized; if
it is, config.sub translates it to a triplet specifying CPU, vendor,
and OS.)

If you have more than one compiler on your system, it is often best to
explicitly set CC in the environment before running configure, and to
also set CC when running make.  For example (assuming sh/bash/ksh):

	CC=gcc ./configure
	make

A similar example using csh:

	setenv CC gcc
	./configure
	make

Much of the code and documentation enclosed is copyright by
the Free Software Foundation, Inc.  See the file COPYING or
COPYING.LIB in the various directories, for a description of the
GNU General Public License terms under which you can copy the files.

REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info
on where and how to report problems.