binutils-gdb/gdbsupport
Tom Tromey af62665e13 Don't pass NULL to memcpy in gdb
I compiled gdb with -fsanitize=undefined and ran the test suite.

A couple of reports came from passing NULL to memcpy, e.g.:

[...]btrace-common.cc:176:13: runtime error: null pointer passed as argument 2, which is declared to never be null

While it would be better to fix this in the standard, in the meantime
it seems easy to avoid this error.

gdb/ChangeLog
2020-03-31  Tom Tromey  <tromey@adacore.com>

	* dwarf2/abbrev.c (abbrev_table::read): Conditionally call
	memcpy.

gdbsupport/ChangeLog
2020-03-31  Tom Tromey  <tromey@adacore.com>

	* btrace-common.cc (btrace_data_append): Conditionally call
	memcpy.
2020-03-31 07:29:53 -06:00
..
.dir-locals.el gdbserver/gdbsupport: Add .dir-locals.el file 2020-03-06 11:29:46 +00:00
.gitattributes gdb, gdbserver, gdbsupport: add .gitattributes files 2020-03-05 15:59:22 +01:00
ChangeLog Don't pass NULL to memcpy in gdb 2020-03-31 07:29:53 -06:00
Makefile.am gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
Makefile.in Move gdb/selftest.m4 to gdbsupport/selftest.m4 2020-03-12 14:19:38 -04:00
README Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
acinclude.m4 Move gdb/selftest.m4 to gdbsupport/selftest.m4 2020-03-12 14:19:38 -04:00
aclocal.m4 Move many configure checks to common.m4 2020-01-14 16:25:03 -07:00
agent.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
agent.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
alt-stack.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
array-view.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
ax.def Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
block-signals.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
break-common.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
btrace-common.cc Don't pass NULL to memcpy in gdb 2020-03-31 07:29:53 -06:00
btrace-common.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
buffer.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
buffer.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
byte-vector.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
check-defines.el Add gdbsupport check-defines script 2020-01-14 16:25:04 -07:00
cleanups.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
cleanups.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
common-debug.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
common-debug.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
common-defs.h Include <alloca.h> conditionally 2020-03-18 02:29:21 +01:00
common-exceptions.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
common-exceptions.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
common-gdbthread.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
common-inferior.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
common-inferior.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
common-regcache.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
common-regcache.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
common-types.h Change gdbsupport not to rely on BFD 2020-03-12 13:32:16 -06:00
common-utils.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
common-utils.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
common.m4 Move sourcing of development.sh to GDB_AC_COMMON 2020-03-12 14:18:00 -04:00
config.in gdb: remove HAVE_DECL_PTRACE 2020-03-20 11:57:49 -04:00
configure gdb: remove HAVE_DECL_PTRACE 2020-03-20 11:57:49 -04:00
configure.ac Move sourcing of development.sh to GDB_AC_COMMON 2020-03-12 14:18:00 -04:00
create-version.sh gdbsupport: Resolve shellcheck issues in create-version.sh script 2020-03-27 13:52:00 +00:00
def-vector.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
default-init-alloc.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
enum-flags.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
environ.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
environ.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
errors.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
errors.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
fileio.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
fileio.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
filestuff.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
filestuff.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
filtered-iterator.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
format.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
format.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
forward-scope-exit.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
function-view.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
gdb-dlfcn.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
gdb-dlfcn.h Fix comment for 'gdb_dlopen' 2020-02-28 11:04:28 -05:00
gdb-sigmask.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
gdb_assert.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
gdb_binary_search.h Fix two typos in gdb_binary_search.h 2020-03-08 11:05:43 -06:00
gdb_locale.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
gdb_optional.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
gdb_proc_service.h Ensure proc-service symbols have default visibility (PR build/24805) 2020-01-16 19:14:14 +00:00
gdb_ref_ptr.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
gdb_setjmp.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
gdb_signals.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
gdb_splay_tree.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
gdb_string_view.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
gdb_string_view.tcc Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
gdb_sys_time.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
gdb_tilde_expand.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
gdb_tilde_expand.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
gdb_unique_ptr.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
gdb_unlinker.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
gdb_vecs.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
gdb_vecs.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
gdb_wait.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
gdb_wait.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
hash_enum.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
host-defs.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
job-control.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
job-control.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
netstuff.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
netstuff.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
new-op.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
next-iterator.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
observable.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
offset-type.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
parallel-for.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
pathstuff.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
pathstuff.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
poison.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
preprocessor.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
print-utils.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
print-utils.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
ptid.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
ptid.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
refcounted-object.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
rsp-low.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
rsp-low.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
run-time-clock.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
run-time-clock.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
safe-iterator.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
safe-strerror.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
scope-exit.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
scoped_fd.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
scoped_mmap.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
scoped_mmap.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
scoped_restore.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
selftest.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
selftest.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
selftest.m4 Move gdb/selftest.m4 to gdbsupport/selftest.m4 2020-03-12 14:19:38 -04:00
signals-state-save-restore.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
signals-state-save-restore.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
signals.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
symbol.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
tdesc.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
tdesc.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
thread-pool.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
thread-pool.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
traits.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
underlying.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
valid-expr.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
version.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
warning.m4 gdb: enable -Wmissing-prototypes warning 2020-03-11 15:15:12 -04:00
x86-xstate.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
xml-utils.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
xml-utils.h Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00

README

This is a helper library that is used by gdb and gdbserver.

To send patches, follow the gdb patch submission instructions in
../gdb/CONTRIBUTE.  For maintainers, see ../gdb/MAINTAINERS.