Age | Commit message (Collapse) | Author | Files | Lines |
|
I happened to notice that "make" would always print:
CONFIG_HEADERS=config.h:config.in \
CONFIG_COMMANDS="default depdir" \
CONFIG_FILES= \
CONFIG_LINKS= \
/bin/sh config.status
config.status: creating config.h
config.status: config.h is unchanged
on every rebuild. This seems to have changed due to an autoconf
upgrade at some point in the past. In the autoconf gdb uses now, it
works to use AC_CONFIG_HEADERS and then create the stamp file via the
"commands" argument.
This patch also fixes up Makefile.in to use the new-style
config.status invocation. It's no longer necessary to pass the output
file names via environment variables.
gdb/ChangeLog
2019-10-17 Tom Tromey <tromey@adacore.com>
* configure: Rebuild.
* configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
in AC_CONFIG_FILES invocation.
* Makefile.in (Makefile, data-directory/Makefile, stamp-h): Use
new-style config.status invocation.
gdb/gdbserver/ChangeLog
2019-10-17 Tom Tromey <tromey@adacore.com>
* configure: Rebuild.
* configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
in AC_CONFIG_FILES invocation.
* Makefile.in (stamp-h, Makefile): Use new-style config.status
invocation.
Change-Id: Ia0530d1c5b9756812d29ddb8dc1062326155e61e
|
|
This comit:
commit 0dc327459b19e6765c8fe80957f5c8620611628e
Date: Mon Oct 7 16:38:53 2019 +0100
gdb: Remove vec.{c,h} and update code to not include vec.h
Broke the GDB build due to leaving a reference to vec-ipa.o in the
Makefile.in, this file is built from vec.c which has been removed.
I got away with this as I had an old version of the vec-ipa.o file
still in my build tree.
With this commit in place a clean build now completed successfully.
gdb/ChangeLog:
* Makefile.in: Remove references to vec-ipa.o.
Change-Id: I4cf55951158dd7ee8f60cd054311a7c367e1d7bf
|
|
Removes vec.c and vec.h from the source tree, and remove all the
remaining includes of vec.h. There should be no user visible changes
after this commit.
I did have a few issues rebuilding GDB after applying this patch due
to cached dependencies, I found that running this command in the build
directory resolved my build issues without requiring a 'make clean':
rm -fr gdb/gdbserver/gdbsupport/.deps/
gdb/ChangeLog:
* Makefile.in: Remove references to vec.h and vec.c.
* aarch64-tdep.c: No longer include vec.h.
* ada-lang.c: Likewise.
* ada-lang.h: Likewise.
* arm-tdep.c: Likewise.
* ax.h: Likewise.
* breakpoint.h: Likewise.
* charset.c: Likewise.
* cp-support.h: Likewise.
* dtrace-probe.c: Likewise.
* dwarf2read.c: Likewise.
* extension.h: Likewise.
* gdb_bfd.c: Likewise.
* gdbsupport/gdb_vecs.h: Likewise.
* gdbsupport/vec.c: Remove.
* gdbsupport/vec.h: Remove.
* gdbthread.h: Likewise.
* guile/scm-type.c: Likewise.
* inline-frame.c: Likewise.
* machoread.c: Likewise.
* memattr.c: Likewise.
* memrange.h: Likewise.
* namespace.h: Likewise.
* nat/linux-btrace.h: Likewise.
* osdata.c: Likewise.
* parser-defs.h: Likewise.
* progspace.h: Likewise.
* python/py-type.c: Likewise.
* record-btrace.c: Likewise.
* rust-exp.y: Likewise.
* solib-target.c: Likewise.
* stap-probe.c: Likewise.
* target-descriptions.c: Likewise.
* target-memory.c: Likewise.
* target.h: Likewise.
* varobj.c: Likewise.
* varobj.h: Likewise.
* xml-support.h: Likewise.
gdb/gdbserver/ChangeLog:
* Makefile.in: Remove references to vec.c.
Change-Id: I0c91d7170bf1b5e992a387fcd9fe4f2abe343bb5
|
|
startup_with_shell was changed to be of "bool" type, but I noticed
that the definition in gdbserver disagreed. This disagreement caused
some regressions on a big-endian machine.
This patch removes the redundant declaration and definition of
startup_with_shell and ensures that such clashes will be diagnosed.
This moves the declaration to common-inferior.h, and introduces a new
common-inferior.c, as suggested by Pedro.
gdb/ChangeLog
2019-10-02 Tom Tromey <tromey@adacore.com>
* Makefile.in (COMMON_SFILES): Add common-inferior.c.
* gdbsupport/common-inferior.c: New file.
* infcmd.c (startup_with_shell): Don't define.
* nat/fork-inferior.h (startup_with_shell): Don't declare.
* gdbsupport/common-inferior.h (startup_with_shell): Declare.
* inferior.h (startup_with_shell): Don't declare.
gdb/gdbserver/ChangeLog
2019-10-02 Tom Tromey <tromey@adacore.com>
* Makefile.in (SFILES): Add common-inferior.c.
(OBS): Add common-inferior.o.
* server.c (startup_with_shell): Don't define.
|
|
I need to use 'gdb_dlopen' inside 'gdbsupport/', but it's not yet
supported there. This commit moves 'gdb-dlfcn.[ch]' to 'gdbsupport/',
which makes it available also on gdbserver.
gdb/ChangeLog:
2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
* configure.ac: Don't check for 'dlfcn.h' (moved to
gdbsupport/common.m4).
* Makefile.in (COMMON_SFILES): Move 'gdb-dlfcn.c' to
'gdbsupport/'.
(HFILES_NO_SRCDIR): Likewise, for 'gdb-dlfcn.h'.
* compile/compile-c-support.c: Include
'gdbsupport/gdb-dlfcn.h'.
* gdbsupport/common.m4: Check for 'dlfcn.h'.
* gdb-dlfcn.c: Move to...
* gdbsupport/gdb-dlfcn.c: ... here.
* gdb-dlfcn.h: Move to...
* gdbsupport/gdb-dlfcn.h: ... here.
gdb/gdbserver/ChangeLog:
2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
(OBS): Add 'gdbsupport/gdb-dlfcn.o'.
* config.in: Regenerate.
* configure: Regenerate.
|
|
This is the next patch in the ongoing series to move gdbsever to the
top level.
This patch just renames the "common" directory. The idea is to do
this move in two parts: first rename the directory (this patch), then
move the directory to the top. This approach makes the patches a bit
more tractable.
I chose the name "gdbsupport" for the directory. However, as this
patch was largely written by sed, we could pick a new name without too
much difficulty.
Tested by the buildbot.
gdb/ChangeLog
2019-07-09 Tom Tromey <tom@tromey.com>
* contrib/ari/gdb_ari.sh: Change common to gdbsupport.
* configure: Rebuild.
* configure.ac: Change common to gdbsupport.
* gdbsupport: Rename from common.
* acinclude.m4: Change common to gdbsupport.
* Makefile.in (CONFIG_SRC_SUBDIR, COMMON_SFILES)
(HFILES_NO_SRCDIR, stamp-version, ALLDEPFILES): Change common to
gdbsupport.
* aarch64-tdep.c, ada-lang.c, ada-lang.h, agent.c, alloc.c,
amd64-darwin-tdep.c, amd64-dicos-tdep.c, amd64-fbsd-nat.c,
amd64-fbsd-tdep.c, amd64-linux-nat.c, amd64-linux-tdep.c,
amd64-nbsd-tdep.c, amd64-obsd-tdep.c, amd64-sol2-tdep.c,
amd64-tdep.c, amd64-windows-tdep.c, arch-utils.c,
arch/aarch64-insn.c, arch/aarch64.c, arch/aarch64.h, arch/amd64.c,
arch/amd64.h, arch/arm-get-next-pcs.c, arch/arm-linux.c,
arch/arm.c, arch/i386.c, arch/i386.h, arch/ppc-linux-common.c,
arch/riscv.c, arch/riscv.h, arch/tic6x.c, arm-tdep.c, auto-load.c,
auxv.c, ax-gdb.c, ax-general.c, ax.h, breakpoint.c, breakpoint.h,
btrace.c, btrace.h, build-id.c, build-id.h, c-lang.h, charset.c,
charset.h, cli/cli-cmds.c, cli/cli-cmds.h, cli/cli-decode.c,
cli/cli-dump.c, cli/cli-option.h, cli/cli-script.c,
coff-pe-read.c, command.h, compile/compile-c-support.c,
compile/compile-c.h, compile/compile-cplus-symbols.c,
compile/compile-cplus-types.c, compile/compile-cplus.h,
compile/compile-loc2c.c, compile/compile.c, completer.c,
completer.h, contrib/ari/gdb_ari.sh, corefile.c, corelow.c,
cp-support.c, cp-support.h, cp-valprint.c, csky-tdep.c, ctf.c,
darwin-nat.c, debug.c, defs.h, disasm-selftests.c, disasm.c,
disasm.h, dtrace-probe.c, dwarf-index-cache.c,
dwarf-index-cache.h, dwarf-index-write.c, dwarf2-frame.c,
dwarf2expr.c, dwarf2loc.c, dwarf2read.c, event-loop.c,
event-top.c, exceptions.c, exec.c, extension.h, fbsd-nat.c,
features/aarch64-core.c, features/aarch64-fpu.c,
features/aarch64-pauth.c, features/aarch64-sve.c,
features/i386/32bit-avx.c, features/i386/32bit-avx512.c,
features/i386/32bit-core.c, features/i386/32bit-linux.c,
features/i386/32bit-mpx.c, features/i386/32bit-pkeys.c,
features/i386/32bit-segments.c, features/i386/32bit-sse.c,
features/i386/64bit-avx.c, features/i386/64bit-avx512.c,
features/i386/64bit-core.c, features/i386/64bit-linux.c,
features/i386/64bit-mpx.c, features/i386/64bit-pkeys.c,
features/i386/64bit-segments.c, features/i386/64bit-sse.c,
features/i386/x32-core.c, features/riscv/32bit-cpu.c,
features/riscv/32bit-csr.c, features/riscv/32bit-fpu.c,
features/riscv/64bit-cpu.c, features/riscv/64bit-csr.c,
features/riscv/64bit-fpu.c, features/tic6x-c6xp.c,
features/tic6x-core.c, features/tic6x-gp.c, filename-seen-cache.h,
findcmd.c, findvar.c, fork-child.c, gcore.c, gdb_bfd.c, gdb_bfd.h,
gdb_proc_service.h, gdb_regex.c, gdb_select.h, gdb_usleep.c,
gdbarch-selftests.c, gdbthread.h, gdbtypes.h, gnu-nat.c,
go32-nat.c, guile/guile.c, guile/scm-ports.c,
guile/scm-safe-call.c, guile/scm-type.c, i386-fbsd-nat.c,
i386-fbsd-tdep.c, i386-go32-tdep.c, i386-linux-nat.c,
i386-linux-tdep.c, i386-tdep.c, i387-tdep.c,
ia64-libunwind-tdep.c, ia64-linux-nat.c, inf-child.c,
inf-ptrace.c, infcall.c, infcall.h, infcmd.c, inferior-iter.h,
inferior.c, inferior.h, inflow.c, inflow.h, infrun.c, infrun.h,
inline-frame.c, language.h, linespec.c, linux-fork.c, linux-nat.c,
linux-tdep.c, linux-thread-db.c, location.c, machoread.c,
macrotab.h, main.c, maint.c, maint.h, memattr.c, memrange.h,
mi/mi-cmd-break.h, mi/mi-cmd-env.c, mi/mi-cmd-stack.c,
mi/mi-cmd-var.c, mi/mi-interp.c, mi/mi-main.c, mi/mi-parse.h,
minsyms.c, mips-linux-tdep.c, namespace.h,
nat/aarch64-linux-hw-point.c, nat/aarch64-linux-hw-point.h,
nat/aarch64-linux.c, nat/aarch64-sve-linux-ptrace.c,
nat/amd64-linux-siginfo.c, nat/fork-inferior.c,
nat/linux-btrace.c, nat/linux-btrace.h, nat/linux-namespaces.c,
nat/linux-nat.h, nat/linux-osdata.c, nat/linux-personality.c,
nat/linux-procfs.c, nat/linux-ptrace.c, nat/linux-ptrace.h,
nat/linux-waitpid.c, nat/mips-linux-watch.c,
nat/mips-linux-watch.h, nat/ppc-linux.c, nat/x86-dregs.c,
nat/x86-dregs.h, nat/x86-linux-dregs.c, nat/x86-linux.c,
nto-procfs.c, nto-tdep.c, objfile-flags.h, objfiles.c, objfiles.h,
obsd-nat.c, observable.h, osdata.c, p-valprint.c, parse.c,
parser-defs.h, ppc-linux-nat.c, printcmd.c, probe.c, proc-api.c,
procfs.c, producer.c, progspace.h, psymtab.h,
python/py-framefilter.c, python/py-inferior.c, python/py-ref.h,
python/py-type.c, python/python.c, record-btrace.c, record-full.c,
record.c, record.h, regcache-dump.c, regcache.c, regcache.h,
remote-fileio.c, remote-fileio.h, remote-sim.c, remote.c,
riscv-tdep.c, rs6000-aix-tdep.c, rust-exp.y, s12z-tdep.c,
selftest-arch.c, ser-base.c, ser-event.c, ser-pipe.c, ser-tcp.c,
ser-unix.c, skip.c, solib-aix.c, solib-target.c, solib.c,
source-cache.c, source.c, source.h, sparc-nat.c, spu-linux-nat.c,
stack.c, stap-probe.c, symfile-add-flags.h, symfile.c, symfile.h,
symtab.c, symtab.h, target-descriptions.c, target-descriptions.h,
target-memory.c, target.c, target.h, target/waitstatus.c,
target/waitstatus.h, thread-iter.h, thread.c, tilegx-tdep.c,
top.c, top.h, tracefile-tfile.c, tracefile.c, tracepoint.c,
tracepoint.h, tui/tui-io.c, ui-file.c, ui-out.h,
unittests/array-view-selftests.c,
unittests/child-path-selftests.c, unittests/cli-utils-selftests.c,
unittests/common-utils-selftests.c,
unittests/copy_bitwise-selftests.c, unittests/environ-selftests.c,
unittests/format_pieces-selftests.c,
unittests/function-view-selftests.c,
unittests/lookup_name_info-selftests.c,
unittests/memory-map-selftests.c, unittests/memrange-selftests.c,
unittests/mkdir-recursive-selftests.c,
unittests/observable-selftests.c,
unittests/offset-type-selftests.c, unittests/optional-selftests.c,
unittests/parse-connection-spec-selftests.c,
unittests/ptid-selftests.c, unittests/rsp-low-selftests.c,
unittests/scoped_fd-selftests.c,
unittests/scoped_mmap-selftests.c,
unittests/scoped_restore-selftests.c,
unittests/string_view-selftests.c, unittests/style-selftests.c,
unittests/tracepoint-selftests.c, unittests/unpack-selftests.c,
unittests/utils-selftests.c, unittests/xml-utils-selftests.c,
utils.c, utils.h, valarith.c, valops.c, valprint.c, value.c,
value.h, varobj.c, varobj.h, windows-nat.c, x86-linux-nat.c,
xml-support.c, xml-support.h, xml-tdesc.h, xstormy16-tdep.c,
xtensa-linux-nat.c, dwarf2read.h: Change common to gdbsupport.
gdb/gdbserver/ChangeLog
2019-07-09 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
* configure.ac: Change common to gdbsupport.
* acinclude.m4: Change common to gdbsupport.
* Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
(version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
common to gdbsupport.
* ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
common to gdbsupport.
|
|
This patch moves the gdb/gnulib subdirectory to the top level.
It adjusts the top-level build system to build gnulib when necessary,
and changes gdb to use this. However, gdbserver still builds its own
copy of gnulib, just from the new source location.
A small hack was needed to ensure that gnulib is only built when gdb
is enabled. The Makefile only provides an ordering -- the directory
must be mentioned in configdirs to actually be compiled at all.
Most of the patch is just a "git mv" of gnulib, though a few minor
path adjustments were needed in some files there.
Tested by the buildbot.
ChangeLog
2019-06-14 Tom Tromey <tom@tromey.com>
* MAINTAINERS: Add gnulib.
* gnulib: New directory, move from gdb/gnulib.
* configure.ac (host_libs): Add gnulib.
* configure: Rebuild.
* Makefile.def (host_modules, dependencies): Add gnulib.
* Makefile.in: Rebuild.
gdb/ChangeLog
2019-06-14 Tom Tromey <tom@tromey.com>
* gnulib: Move directory to top-level.
* configure.ac: Don't configure gnulib.
* configure: Rebuild.
* common/common-defs.h: Use new path to gnulib.
* Makefile.in (GNULIB_BUILDDIR): Now ../gnulib.
(GNULIB_H): Remove.
(INCGNU): Look in new gnulib location.
(HFILES_NO_SRCDIR): Remove gnulib files.
(SUBDIR, REQUIRED_SUBDIRS): Remove gnulib.
(generated_files): Remove GNULIB_H.
($(LIBGNU), all-lib): Remove targets.
(distclean): Don't mention GNULIB_BUILDDIR.
($(GNULIB_BUILDDIR)/Makefile): Remove target.
gdb/gdbserver/ChangeLog
2019-06-14 Tom Tromey <tom@tromey.com>
* configure.ac: Use new path to gnulib.
* configure: Rebuild.
* Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
to gnulib.
gnulib/ChangeLog
2019-06-14 Tom Tromey <tom@tromey.com>
* update-gnulib.sh: Adjust paths.
* Makefile.in: Adjust paths.
* configure.ac: Adjust paths. Use ACX_LARGEFILE.
* configure: Rebuild.
|
|
When "common" becomes a library, linking will cause a symbol clash,
because "xmalloc" and some related symbols are defined in that
library, libiberty, and readline.
To work around this problem, this patch moves the clashing symbols to
a new file, which is then compiled separately for both gdb and
gdbserver.
gdb/ChangeLog
2019-06-11 Tom Tromey <tom@tromey.com>
* common/common-utils.c (xmalloc, xrealloc, xcalloc)
(xmalloc_failed): Move to alloc.c.
* alloc.c: New file.
* Makefile.in (COMMON_SFILES): Add alloc.c.
gdb/gdbserver/ChangeLog
2019-06-11 Tom Tromey <tom@tromey.com>
* Makefile.in (SFILES): Add alloc.c.
(OBS): Add alloc.o.
(IPA_OBJS): Add alloc-ipa.o.
(alloc-ipa.o): New target.
(%.o: ../%.c): New pattern rule.
|
|
gdbreplay had its own implementation of fromhex. This patch changes
it to use the one in common/.
gdb/gdbserver/ChangeLog
2019-06-02 Tom Tromey <tom@tromey.com>
* gdbreplay.c (fromhex): Remove.
* Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
|
|
The IPA objects currently may use gnulib replacement apis, which is
wrong: gnulib is not linked into the produced dso and it cannot be
because it is not built with -fPIC -fvisibility=hidden.
The gnulib replacement detection is broken under cross compilation:
for targets other than *-gnu*, replacements are enabled that depend
on execution time detection. This causes unnecessary build failure
when the target has proper support for the replaced api.
This fix tries to undo the replacements, which is tricky because the
gnulib headers are still used for various compile time fixups and
there is no simple knob in gnulib to only turn the replacements off.
Without this workaround gdb fails to cross build to non-gnu targets:
ld: tracepoint-ipa.o: in function `gdb_agent_helper_thread(void*)':
gdb/gdbserver/tracepoint.c:7221: undefined reference to `rpl_strerror'
...
Makefile:434: recipe for target 'libinproctrace.so' failed
gdb/gdbserver/ChangeLog:
PR gdb/23985
* Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
(UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
|
|
This changes the Makefiles to remove the -I for the common/
subdirectory. This will enforce the rule that includes must use the
'common/filename.h' form.
gdb/ChangeLog
2019-01-25 Tom Tromey <tom@tromey.com>
* Makefile.in (GDB_CFLAGS): Don't add -I for common.
gdb/gdbserver/ChangeLog
2019-01-25 Tom Tromey <tom@tromey.com>
* Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
|
|
This commit applies all changes made after running the gdb/copyright.py
script.
Note that one file was flagged by the script, due to an invalid
copyright header
(gdb/unittests/basic_string_view/element_access/char/empty.cc).
As the file was copied from GCC's libstdc++-v3 testsuite, this commit
leaves this file untouched for the time being; a patch to fix the header
was sent to gcc-patches first.
gdb/ChangeLog:
Update copyright year range in all GDB files.
|
|
Tom mentioned this a while ago, as a way to give you a cheap sense of
progression in your build, as all object files will be built
alphabetically (including the directory part). I tried it and I think
it's nice.
gdb/ChangeLog:
* Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
gdb/gdbserver/ChangeLog:
* Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
(gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
($(IPA_LIB)): Sort IPA_OBJS.
|
|
ADD_DEPS is defined nowhere, so I presume it's not useful. If I'm wrong
and this is actually used, there should be a comment explaining where it
comes from.
gdb/gdbserver/ChangeLog:
* Makefile.in: Remove references to $(ADD_DEPS).
|
|
This patch implements IPv6 support for both GDB and gdbserver. Based
on my research, it is the fourth attempt to do that since 2006. Since
I used ideas from all of the previous patches, I also added their
authors's names on the ChangeLogs as a way to recognize their
efforts. For reference sake, you can find the previous attempts at:
https://sourceware.org/ml/gdb-patches/2006-09/msg00192.html
https://sourceware.org/ml/gdb-patches/2014-02/msg00248.html
https://sourceware.org/ml/gdb-patches/2016-02/msg00226.html
The basic idea behind the patch is to start using the new
'getaddrinfo'/'getnameinfo' calls, which are responsible for
translating names and addresses in a protocol-independent way. This
means that if we ever have a new version of the IP protocol, we won't
need to change the code again (or, at least, won't have to change the
majority of the code).
The function 'getaddrinfo' returns a linked list of possible addresses
to connect to. Dealing with multiple addresses proved to be a hard
task with the current TCP auto-retry mechanism implemented on
ser-tcp:net_open. For example, when gdbserver listened only on an
IPv4 socket:
$ ./gdbserver --once 127.0.0.1:1234 ./a.out
and GDB was instructed to try to connect to both IPv6 and IPv4
sockets:
$ ./gdb -ex 'target extended-remote localhost:1234' ./a.out
the user would notice a somewhat big delay before GDB was able to
connect to the IPv4 socket. This happened because GDB was trying to
connect to the IPv6 socket first, and had to wait until the connection
timed out before it tried to connect to the IPv4 socket.
For that reason, I had to rewrite the main loop and implement a new
method for handling multiple connections. After some discussion,
Pedro and I agreed on the following algorithm:
1) For each entry returned by 'getaddrinfo', we try to open a socket
and connect to it.
2.a) If we have a successful 'connect', we just use that connection.
2.b) If we don't have a successfull 'connect', but if we've got a
ECONNREFUSED (meaning the the connection was refused), we keep track
of this fact by using a flag.
2.c) If we don't have a successfull 'connect', but if we've got a
EINPROGRESS (meaning that the connection is in progress), we perform
a 'select' call on the socket until we have a result (either a
successful connection, or an error on the socket).
3) If tcp_auto_retry is true, and we haven't gotten a successful
connection, and at least one of our attempts failed with
ECONNREFUSED, then we wait a little bit (i.e., call
'wait_for_connect'), check to see if there was a
timeout/interruption (in which case we bail out), and then go back
to (1).
After multiple tests, I was able to connect without delay on the
scenario described above, and was also able to connect in all other
types of scenarios.
I also implemented some hostname parsing functions (along with their
corresponding unit tests) which are used to help GDB and gdbserver to
parse hostname strings provided by the user. These new functions are
living inside common/netstuff.[ch]. I've had to do that since IPv6
introduces a new URL scheme, which defines that square brackets can be
used to enclose the host part and differentiate it from the
port (e.g., "[::1]:1234" means "host ::1, port 1234"). I spent some
time thinking about a reasonable way to interpret what the user wants,
and I came up with the following:
- If the user has provided a prefix that doesn't specify the protocol
version (i.e., "tcp:" or "udp:"), or if the user has not provided
any prefix, don't make any assumptions (i.e., assume AF_UNSPEC when
dealing with 'getaddrinfo') *unless* the host starts with "[" (in
which case, assume it's an IPv6 host).
- If the user has provided a prefix that does specify the protocol
version (i.e., "tcp4:", "tcp6:", "udp4:" or "udp6:"), then respect
that.
This method doesn't follow strictly what RFC 2732 proposes (that
literal IPv6 addresses should be provided enclosed in "[" and "]")
because IPv6 addresses still can be provided without square brackets
in our case, but since we have prefixes to specify protocol versions I
think this is not an issue.
Another thing worth mentioning is the new 'GDB_TEST_SOCKETHOST'
testcase parameter, which makes it possible to specify the
hostname (without the port) to be used when testing GDB and
gdbserver. For example, to run IPv6 tests:
$ make check-gdb RUNTESTFLAGS='GDB_TEST_SOCKETHOST=tcp6:[::1]'
Or, to run IPv4 tests:
$ make check-gdb RUNTESTFLAGS='GDB_TEST_SOCKETHOST=tcp4:127.0.0.1'
This required a few changes on the gdbserver-base.exp, and also a
minimal adjustment on gdb.server/run-without-local-binary.exp.
Finally, I've implemented a new testcase,
gdb.server/server-connect.exp, which is supposed to run on the native
host and perform various "smoke tests" using different connection
methods.
This patch has been regression-tested on BuildBot and locally, and
also built using a x86_64-w64-mingw32 GCC, and no problems were found.
gdb/ChangeLog:
2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
Jan Kratochvil <jan.kratochvil@redhat.com>
Paul Fertser <fercerpav@gmail.com>
Tsutomu Seki <sekiriki@gmail.com>
Pedro Alves <palves@redhat.com>
* Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
'unittests/parse-connection-spec-selftests.c'.
(COMMON_SFILES): Add 'common/netstuff.c'.
(HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
* NEWS (Changes since GDB 8.2): Mention IPv6 support.
* common/netstuff.c: New file.
* common/netstuff.h: New file.
* ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
(wait_for_connect): Update comment. New parameter
'gdb::optional<int> sock' instead of 'struct serial *scb'.
Use 'sock' directly instead of 'scb->fd'.
(try_connect): New function, with code from 'net_open'.
(net_open): Rewrite main loop to deal with multiple
sockets/addresses. Handle IPv6-style hostnames; implement
support for IPv6 connections.
* unittests/parse-connection-spec-selftests.c: New file.
gdb/gdbserver/ChangeLog:
2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
Jan Kratochvil <jan.kratochvil@redhat.com>
Paul Fertser <fercerpav@gmail.com>
Tsutomu Seki <sekiriki@gmail.com>
* Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
(OBS): Add 'common/netstuff.o'.
(GDBREPLAY_OBS): Likewise.
* gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
(remote_open): Implement support for IPv6
connections.
* remote-utils.c: Include 'netstuff.h', 'filestuff.h'
and 'wspiapi.h'.
(handle_accept_event): Accept connections from IPv6 sources.
(remote_prepare): Handle IPv6-style hostnames; implement
support for IPv6 connections.
(remote_open): Implement support for printing connections from
IPv6 sources.
gdb/testsuite/ChangeLog:
2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
Jan Kratochvil <jan.kratochvil@redhat.com>
Paul Fertser <fercerpav@gmail.com>
Tsutomu Seki <sekiriki@gmail.com>
* README (Testsuite Parameters): Mention new 'GDB_TEST_SOCKETHOST'
parameter.
* boards/native-extended-gdbserver.exp: Do not set 'sockethost'
by default.
* boards/native-gdbserver.exp: Likewise.
* gdb.server/run-without-local-binary.exp: Improve regexp used
for detecting when a remote debugging connection succeeds.
* gdb.server/server-connect.exp: New file.
* lib/gdbserver-support.exp (gdbserver_default_get_comm_port):
Do not prefix the port number with ":".
(gdbserver_start): New global GDB_TEST_SOCKETHOST. Implement
support for detecting and using it. Add '$debughost_gdbserver'
to the list of arguments used to start gdbserver. Handle case
when gdbserver cannot resolve a network name.
gdb/doc/ChangeLog:
2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
Jan Kratochvil <jan.kratochvil@redhat.com>
Paul Fertser <fercerpav@gmail.com>
Tsutomu Seki <sekiriki@gmail.com>
* gdb.texinfo (Remote Connection Commands): Add explanation
about new IPv6 support. Add new connection prefixes.
|
|
Add support for reading and writing registers for Aarch64 SVE.
We need to support the cases where the kernel only gives us a
fpsimd structure. This occurs when there is no active SVE state
in the kernel (for example, after starting a new process).
Added checks to make sure the vector length has not changed whilst
the process is running.
gdb/
* aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
(store_sveregs_to_thread): Likewise.
(aarch64_linux_fetch_inferior_registers): Check for SVE.
(aarch64_linux_store_inferior_registers): Likewise.
* nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
function.
(aarch64_sve_regs_copy_to_regcache): Likewise.
(aarch64_sve_regs_copy_from_regcache): Likewise.
* nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
declaration.
(aarch64_sve_regs_copy_to_regcache): Likewise.
(aarch64_sve_regs_copy_from_regcache): Likewise.
(sve_context): Structure from Linux headers.
(SVE_SIG_ZREGS_SIZE): Define from Linux headers.
(SVE_SIG_ZREG_SIZE): Likewise.
(SVE_SIG_PREG_SIZE): Likewise.
(SVE_SIG_FFR_SIZE): Likewise.
(SVE_SIG_REGS_OFFSET): Likewise.
(SVE_SIG_ZREGS_OFFSET): Likewise.
(SVE_SIG_ZREG_OFFSET): Likewise.
(SVE_SIG_ZREGS_SIZE): Likewise.
(SVE_SIG_PREGS_OFFSET): Likewise.
(SVE_SIG_PREG_OFFSET): Likewise.
(SVE_SIG_PREGS_SIZE): Likewise.
(SVE_SIG_FFR_OFFSET): Likewise.
(SVE_SIG_REGS_SIZE): Likewise.
(SVE_SIG_CONTEXT_SIZE): Likewise.
(SVE_PT_REGS_MASK): Likewise.
(SVE_PT_REGS_FPSIMD): Likewise.
(SVE_PT_REGS_SVE): Likewise.
(SVE_PT_VL_INHERIT): Likewise.
(SVE_PT_VL_ONEXEC): Likewise.
(SVE_PT_REGS_OFFSET): Likewise.
(SVE_PT_FPSIMD_OFFSET): Likewise.
(SVE_PT_FPSIMD_SIZE): Likewise.
(SVE_PT_SVE_ZREG_SIZE): Likewise.
(SVE_PT_SVE_PREG_SIZE): Likewise.
(SVE_PT_SVE_FFR_SIZE): Likewise.
(SVE_PT_SVE_FPSR_SIZE): Likewise.
(SVE_PT_SVE_FPCR_SIZE): Likewise.
(__SVE_SIG_TO_PT): Likewise.
(SVE_PT_SVE_OFFSET): Likewise.
(SVE_PT_SVE_ZREGS_OFFSET): Likewise.
(SVE_PT_SVE_ZREG_OFFSET): Likewise.
(SVE_PT_SVE_ZREGS_SIZE): Likewise.
(SVE_PT_SVE_PREGS_OFFSET): Likewise.
(SVE_PT_SVE_PREG_OFFSET): Likewise.
(SVE_PT_SVE_PREGS_SIZE): Likewise.
(SVE_PT_SVE_FFR_OFFSET): Likewise.
(SVE_PT_SVE_FPSR_OFFSET): Likewise.
(SVE_PT_SVE_FPCR_OFFSET): Likewise.
(SVE_PT_SVE_SIZE): Likewise.
(SVE_PT_SIZE): Likewise.
(HAS_SVE_STATE): New define.
gdbserver/
* Makefile.in: Add aarch64-sve-linux-ptrace.c.
|
|
This makes gdbreplay share a bit more code with gdbserver, and paves
the way to share more in future. Including common-defs.h pulls in
defines and headers that gdb and gdbserver assume are always
defined/available too, such as for example _(), ansidecl.h or a set of
system headers. Including that revealed (static vs extern conflict)
gdbreplay had a local copy of perror_with_name (which exited directly
instead of throwing an error). So I removed gdbreplay's local copy,
and then added enough .o files until gdbreplay linked successfully.
Also, use xstrdup instead of strdup.
gdb/gdbserver/ChangeLog:
2018-06-08 Pedro Alves <palves@redhat.com>
* Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
common/common-exceptions.o, common/common-utils.o,
common/errors.o, common/print-utils.o and utils.o.
* gdbreplay.c: Include "common-defs.h" instead of the two
'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
string.h or alloca.h.
(perror_with_name): Delete.
(remote_open): Use xstrdup instead of strdup.
(main): Rename to ...
(captured_main): ... this.
(main): New.
|
|
Share target description declarations and selection among ppc linux
native targets, core files, gdbserver and IPA.
To avoid complicated define guards, gdbserver and IPA now have
declarations for all descriptions, including 64-bit generated
descriptions when compiled in 32-bit mode. These have always been
linked into the gdbserver and IPA binaries. Because they might be
uninitialized, the selection function checks that the selected
description is initialized.
gdb/ChangeLog:
2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
* arch/ppc-linux-common.c: New file.
* arch/ppc-linux-common.h: New file.
* arch/ppc-linux-tdesc.h: New file.
* configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
* Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
(HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
arch/ppc-linux-tdesc.h.
* ppc-linux-nat.c: Include arch/ppc-linux-common.h and
arch/ppc-linux-tdesc.h.
(ppc_linux_nat_target::read_description): Remove target
description matching code. Fill a ppc_linux_features struct and
call ppc_linux_match_description with it. Move comment about ISA
2.05 to ppc-linux-common.c.
* ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
arch/ppc-linux-tdesc.h.
(ppc_linux_core_read_description): Remove target description
matching code. Fill a ppc_linux_features struct and call
ppc_linux_match_description with it.
* ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
(tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
(tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
(tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
(tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
(tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
(tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
(tdesc_powerpc_e500l): Remove.
gdb/gdbserver/ChangeLog:
2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
* configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
* Makefile.in (SFILES): Add arch/ppc-linux-common.c.
* linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
* linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
(tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
(tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
(tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
(tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
(tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
(tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
(tdesc_powerpc_e500l): Remove.
* linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
* linux-ppc-low.c: Include arch/ppc-linux-common.h,
arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
linux-ppc-tdesc.h.
(ppc_arch_setup): Remove target description matching code. Fill a
ppc_linux_features struct and call ppc_linux_match_description
with it.
|
|
The dependency tracking (the thing that knows which source file included
which other source file during last build to know what to rebuild when
an included file changes) is broken for gdbserver subdirectories (arch
and common).
The dependency tracking files are created in the form
arch/.deps/i386.Po
but we try to include
.deps/arch/i386.Po
An easy smoke test is too "touch" the gdb/features/i386/32bit-core.c
file in the source directory and try to rebuild gdbserver. This file is
included by gdb/arch/i386.c, so it should cause
gdb/gdbserver/arch/i386.o in the build directory to be rebuilt. It
currently isn't rebuilt, but is with this patch applied.
This patch copies the technique used in GDB to transform the dep file
paths to the proper form.
Also, while testing using the depcomp method of dependency tracking (by
just hacking the condition), I noticed that depcomp was not found. The
path to depcomp seems to be missing a "..".
gdb/gdbserver/ChangeLog:
* Makefile.in (depcomp): Add "..".
(all_deps_files): New and use it.
|
|
gdb/
* Makefile.in: Add arch/tdesc.c
* common/tdesc.c: New file.
* common/tdesc.h (tdesc_element_visitor): Move to here.
(tdesc_element): Likewise.
(tdesc_reg): Likewise.
(tdesc_reg_up): Likewise.
* regformats/regdef.h (reg): Add offset to constructors.
* target-descriptions.c (tdesc_element_visitor): Move from here.
(tdesc_element): Likewise.
(tdesc_reg): Likewise.
(tdesc_reg_up): Likewise.
gdbserver/
* Makefile.in: Add common/tdesc.c
* tdesc.c (init_target_desc): init all reg_defs from register vector.
(tdesc_create_reg): Create tdesc_reg.
* tdesc.h (tdesc_feature): Add register vector.
|
|
Many projects (e.g. the Linux kernel) and build systems use "silent"
rules, which means that they'll only print a summary of what's being
done instead of printing all the detailed command lines. While chatting
on the #gdb IRC channel, I realized a few people (including me) thought
it would be nice to have it in GDB too.
The idea is that too much text is not useful, the important information
gets lost. If there's only the essential information, it's more likely
to be useful. Most of the time, when I look at the build output, it's
to see how it's progressing. By just printing a brief summary of each
operation, I can easily spot what's currently being compiled and
therefore how the build progresses (with time you know the order in
which files are compiled almost by heart).
As with other projects (Linux, automake-based things, probably others),
it's possible to print the complete command lines by passing V=1 to make
(or any other non-zero value).
I had one hesitation about this: when people report build failures, we
are more likely to miss the full compile command line. We'll probably
sometimes need to ask people to include the build log with "make V=1".
I don't think it's a big downside, if other projects the size of the
Linux kernel can live with it, I'm sure we can too.
gdb/ChangeLog:
* silent-rules.mk: New.
* Makefile.in: Include silent-rules.mk
(srcdir, VPATH, top_srcdir): Move up.
(COMPILE): Add ECHO_CXX.
(test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
(init.c): Add ECHO_INIT_C.
(gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
(version.c): Add ECHO_GEN.
(printcmd.o): Add ECHO_CXX.
(target-float.o): Add ECHO_CXX.
(ada-exp.o): Add ECHO_CXX.
(stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
(insight$(EXEEXT)): Add ECHO_CXXLD.
* gnulib/configure.ac: Add AM_SILENT_RULES.
* gnulib/aclocal.m4: Re-generate.
* gnulib/configure: Re-generate.
* gnulib/import/Makefile.in: Re-generate.
gdb/gdbserver/ChangeLog:
* Makefile.in: Include silent-rules.mk.
(srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
(COMPILE): Add ECHO_CXX.
(gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
(gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
(version-generated.c): Add ECHO_GEN.
(stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
(IPAGENT_COMPILE): Add ECHO_CXX.
(%-generated.c): Add ECHO_REGDAT.
|
|
This commit moves the path manipulation routines found on utils.c to a
new common/pathstuff.c, and updates the Makefile.in's accordingly.
The routines moved are "gdb_realpath", "gdb_realpath_keepfile" and
"gdb_abspath".
This will be needed because gdbserver will have to call "gdb_abspath"
on my next patch, which implements a way to expand the path of the
inferior provided by the user in order to allow specifying just the
binary name when starting gdbserver, like:
$ gdbserver :1234 a.out
With the recent addition of the startup-with-shell feature on
gdbserver, this scenario doesn't work anymore if the user doesn't have
the current directory listed in the PATH variable.
I had to do a minor adjustment on "gdb_abspath" because we don't have
access to "tilde_expand" on gdbserver, so now the function is using
"gdb_tilde_expand" instead. Otherwise, the code is the same.
Regression tested on the BuildBot, without regressions.
gdb/ChangeLog:
2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
(HFILES_NO_SRCDIR): Add "common/pathstuff.h".
* auto-load.c: Include "common/pathstuff.h".
* common/common-def.h (current_directory): Move here.
* common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
function.
* common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
prototype.
* common/pathstuff.c: New file.
* common/pathstuff.h: New file.
* compile/compile.c: Include "common/pathstuff.h".
* defs.h (current_directory): Move to "common/common-defs.h".
* dwarf2read.c: Include "common/pathstuff.h".
* exec.c: Likewise.
* guile/scm-safe-call.c: Likewise.
* linux-thread-db.c: Likewise.
* main.c: Likewise.
* nto-tdep.c: Likewise.
* objfiles.c: Likewise.
* source.c: Likewise.
* symtab.c: Likewise.
* utils.c: Include "common/pathstuff.h".
(gdb_realpath): Move to "common/pathstuff.c".
(gdb_realpath_keepfile): Likewise.
(gdb_abspath): Likewise.
* utils.h (gdb_realpath): Move to "common/pathstuff.h".
(gdb_realpath_keepfile): Likewise.
(gdb_abspath): Likewise.
gdb/gdbserver/ChangeLog:
2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
(OBJS): Add "pathstuff.o".
* server.c (current_directory): New global variable.
(captured_main): Initialize "current_directory".
|
|
gdbserver/
* Makefile.in: Switch order of make rules.
|
|
gdb/
* Makefile.in: (COMMON_SFILES): Add common/*.c files.
(SFILES): Remove common/*.c files.
(COMMON_OBS): Remove some *.o files built from common/*.c files.
* common/common.host: Add common reference.
* configure.ac: Likewise.
* configure: Regenerate.
gdbserver/
* Makefile.in: Add common directory in build.
* configure.ac: Add common reference.
* configure: Regenerate.
|
|
When we set bfd/development.sh:$development to false, GDBserver failed to
build,
selftest.o: In function `selftests::run_tests(char const*)':
binutils-gdb/gdb/gdbserver/../common/selftest.c:97:undefined reference to `selftests::reset()'
collect2: error: ld returned 1 exit status
selftest.o shouldn't be compiled and linked when $development is false.
With this patch, in release mode, GDBserver doesn't nothing with option
--selftest,
$ ./gdbserver --selftest=foo
Selftests are not available in a non-development build.
$ ./gdbserver --selftest
Selftests are not available in a non-development build.
gdb/gdbserver:
2018-01-08 Yao Qi <yao.qi@linaro.org>
Simon Marchi <simon.marchi@ericsson.com>
* Makefile.in (OBS): Remove selftest.o.
* configure.ac: Set srv_selftest_objs if $development is true.
(GDBSERVER_DEPFILES): Append $srv_selftest_objs.
* configure: Re-generated.
* server.c (captured_main): Wrap variable selftest_filter with
GDB_SELF_TEST.
gdb/testsuite:
2018-01-08 Simon Marchi <simon.marchi@ericsson.com>
* gdb.server/unittest.exp: Match the output in non-development
mode.
|
|
gdb/ChangeLog:
Update copyright year range in all GDB files
|
|
gdbserver/
* Makefile.in: Update arch rules.
* configure.srv: Explicitly mark arch/ files.
|
|
gdb/gdbserver:
2017-10-17 Yao Qi <yao.qi@linaro.org>
* Makefile.in: Remove one rule.
* configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
|
|
Similar to f38307f5 (Replicate src dir in build dir), this patch change
configure and Makefile to generate object files in arch/ directory.
gdb/gdbserver:
2017-10-17 Yao Qi <yao.qi@linaro.org>
* Makefile.in (CONFIG_SRC_SUBDIR): New variable.
(clean): Remove .o files in CONFIG_SRC_SUBDIR.
(distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
(arch-i386.o, arch-amd64.o): Remove rules.
(arch/%.o): New rule.
Update POSTCOMPILE and COMPILE.pre.
* configure.ac: Invoke AC_CONFIG_COMMANDS.
* configure: Re-generated.
* configure.srv: Replace arch-i386.o with arch/i386.o.
Replace arch-amd64.o with arch/amd64.o.
|
|
Currently, whenever we want to handle paths provided by the user and
perform tilde expansion on GDB, we rely on "tilde_expand", which comes
from readline. This was enough for our use cases so far, but the
situation will change when we start dealing with paths on gdbserver as
well, which is what the next patches implement.
Unfortunately it is not possible to use "tilde_expand" in this case
because gdbserver doesn't use readline. For that reason I decided to
implement a new "gdb_tilde_expand" function, which is basically a
wrapper for "glob" and its GNU extension, GLOB_TILDE_CHECK. With the
import of the "glob" module from gnulib, we're sure that "glob" always
supports this extension.
gdb/ChangeLog:
2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in (SFILES): Add gdb_tilde_expand.c.
(HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
(COMMON_OBS): Add gdb_tilde_expand.o.
* common/gdb_tilde_expand.c: New file.
* common/gdb_tilde_expand.h: Likewise.
gdb/gdbserver/ChangeLog:
2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
(OBS): Add gdb_tilde_expand.o.
|
|
This patch changes amd64-linux target descriptions so that they can be
dynamically generated in both GDB and GDBserver.
gdb/gdbserver:
2017-09-05 Yao Qi <yao.qi@linaro.org>
* Makefile.in (arch-amd64.o): New rule.
* configure.srv: Append arch-amd64.o.
* linux-amd64-ipa.c: Include common/x86-xstate.h.
(get_ipa_tdesc): Call amd64_linux_read_description.
(initialize_low_tracepoint): Don't call init_registers_x32_XXX
and init_registers_amd64_XXX.
* linux-x86-low.c (x86_linux_read_description): Call
amd64_linux_read_description.
(x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
(initialize_low_arch): Don't call init_registers_x32_XXX and
init_registers_amd64_XXX.
* linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
and tdesc_amd64_XXX.
[__x86_64__] (amd64_tdesc_test): New function.
(initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
and init_registers_amd64_XXX.
* linux-x86-tdesc.c: Include arch/amd64.h.
(xcr0_to_tdesc_idx): New function.
(i386_linux_read_description): New function.
(amd64_get_ipa_tdesc_idx): New function.
* linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
(amd64_get_ipa_tdesc): Declare.
gdb:
2017-09-05 Yao Qi <yao.qi@linaro.org>
* amd64-linux-tdep.c: Include arch/amd64.h. Don't include
features/i386/*.c.
(amd64_linux_read_description): Call
amd64_create_target_description.
* arch/amd64.c: New file.
* arch/amd64.h: New file.
* configure.tgt (x86_64-*-linux*): Append amd64.o.
* Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
|
|
The code on creating i386-linux target descriptions are quite similar
between GDB and GDBserver, so this patch moves them into a shared file
arch/i386.c. I didn't name it as i386-linux.c, because I want to reuse it
to create other i386 non-linux target descriptions later.
gdb:
2017-09-05 Yao Qi <yao.qi@linaro.org>
* Makefile.in (ALL_TARGET_OBS): Add i386.o.
(SFILES): Add arch/i386.c.
(HFILES_NO_SRCDIR): Add arch/i386.h.
* arch/i386.c: New file.
* arch/i386.h: New file.
* arch/tdesc.h (allocate_target_description): Declare.
(set_tdesc_architecture): Declare.
(set_tdesc_osabi): Declare.
* configure.tgt (i[34567]86-*-linux*): Add i386.o.
* i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
include arch/i386.h.
(i386_linux_read_description): Remove code and call
i386_create_target_description.
(set_tdesc_architecture): New function.
(set_tdesc_osabi): New function.
* target-descriptions.h (allocate_target_description): Remove.
gdb/gdbserver:
2017-09-05 Yao Qi <yao.qi@linaro.org>
* Makefile.in (arch-i386.o): New rule.
* configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
(x86_64-*-linux*): Likewise.
* linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
include arch/i386.h.
(i386_linux_read_description): Remove code and call
i386_create_target_description.
* tdesc.c (allocate_target_description): New function.
* tdesc.h (set_tdesc_architecture): Remove declaration.
(set_tdesc_osabi): Likewise.
|
|
Nowadays, target_desc.reg_defs is a pointer points to a pre-generated
array, which is not flexible. This patch changes it from an array
to a VEC so that GDBserver can create target descriptions dynamically
later. Instead of using pre-generated array, the -generated.c calls
VEC_safe_push to add each register to vector.
Since target_desc.reg_defs is used in IPA, we need to build common/vec.c
for IPA too.
gdb/gdbserver:
2017-09-05 Yao Qi <yao.qi@linaro.org>
* Makefile.in (IPA_OBJS): Add vec-ipa.o
* regcache.c (get_thread_regcache): Use VEC_length.
(init_register_cache): Likewise.
(regcache_cpy): Likewise.
(registers_to_string): Iterate reg_defs via VEC_iterate.
(find_regno): Likewise.
(find_register_by_number): Use VEC_index.
(register_size): Call find_register_by_number.
(register_data): Call find_register_by_number.
(supply_regblock): Use VEC_length.
(regcache_raw_read_unsigned): Likewise.
* tdesc.c (init_target_desc): Iterate reg_defs via
VEC_iterate.
(default_description): Update initializer.
(copy_target_description): Don't update field num_registers.
* tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
<num_registers>: Remove.
gdb:
2017-09-05 Yao Qi <yao.qi@linaro.org>
* regformats/regdat.sh: Update generated code.
|
|
If you "make" from scratch in gdbserver/, you'll notice that make
deletes the files it considers as intermediary at the end:
$ make clean && make
...
rm i386-mmx-linux-generated.c x32-avx-avx512-linux-generated.c ...
Then, if you type make again, make will rebuild these files and rebuild
gdbserver. To avoid this, we can add the .SECONDARY special target. If
it has no pre-requisites, all intermediary files will be kept.
gdb/gdbserver/ChangeLog:
* Makefile.in (.SECONDARY): Define target.
|
|
This patch uses GDB self test in GDBserver. The self tests are run if
GDBserver is started with option --selftest.
gdb:
2017-08-18 Yao Qi <yao.qi@linaro.org>
* NEWS: Mention GDBserver's new option "--selftest".
* Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
* selftest.c: Move it to common/selftest.c.
* selftest.h: Move it to common/selftest.h.
* selftest-arch.c (reset): New function.
(tests_with_arch): Call reset.
gdb/gdbserver:
2017-08-18 Yao Qi <yao.qi@linaro.org>
* Makefile.in (OBS): Add selftest.o.
* configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
* configure, config.in: Re-generated.
* server.c: Include common/sefltest.h.
(captured_main): Handle option --selftest.
gdb/testsuite:
2017-08-18 Yao Qi <yao.qi@linaro.org>
* gdb.server/unittest.exp: New.
gdb/doc:
2017-08-18 Yao Qi <yao.qi@linaro.org>
* gdb.texinfo (Server): Document "--selftest".
|
|
gdb/gdbserver/ChangeLog:
* Makefile.in (IPA_OBJS): Sort and format one item per line.
|
|
Because we are compiling .c files containing C++ code, clang++ complains
with:
clang: error: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
If renaming all the source files to .cpp is out of the question, an
alternative is to pass "-x c++" to convince the compiler that we are
really compiling C++. It works fine with GCC too.
gdb/ChangeLog:
* Makefile.in (COMPILE.pre): Add "-x c++".
gdb/gdbserver/ChangeLog:
* Makefile.in (COMPILE.pre): Add "-x c++".
|
|
This is the most important (and the biggest, sorry) patch of the
series. It moves fork_inferior from gdb/fork-child.c to
nat/fork-inferior.c and makes all the necessary adjustments to both
GDB and gdbserver to make sure everything works OK.
There is no "most important change" with this patch; all changes are
made in a progressive way, making sure that gdbserver had the
necessary features while not breaking GDB at the same time.
I decided to go ahead and implement a partial support for starting the
inferior with a shell on gdbserver, although the full feature comes in
the next patch. The user won't have the option to disable the
startup-with-shell, and also won't be able to change which shell
gdbserver will use (other than setting the $SHELL environment
variable, that is).
Everything is working as expected, and no regressions were present
during the tests.
gdb/ChangeLog:
2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
Pedro Alves <palves@redhat.com>
* Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
and "nat/fork-inferior.h".
* common/common-inferior.h: New file, with contents from
"gdb/inferior.h".
* commom/common-utils.c: Include "common-utils.h".
(stringify_argv): New function.
* common/common-utils.h (stringify_argv): New prototype.
* configure.nat: Add "fork-inferior.o" as a dependency for
"*linux*", "fbsd*" and "nbsd*" hosts.
* corefile.c (get_exec_file): Update comment.
* darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
instead of "startup_inferior".
(darwin_create_inferior): Call "add_thread_silent" after
"fork_inferior".
* fork-child.c: Cleanup unnecessary includes.
(SHELL_FILE): Move to "common/common-fork-child.c".
(environ): Likewise.
(exec_wrapper): Initialize.
(get_exec_wrapper): New function.
(breakup_args): Move to "common/common-fork-child.c"; rename to
"breakup_args_for_exec".
(escape_bang_in_quoted_argument): Move to
"common/common-fork-child.c".
(saved_ui): New variable.
(prefork_hook): New function.
(postfork_hook): Likewise.
(postfork_child_hook): Likewise.
(gdb_startup_inferior): Likewise.
(fork_inferior): Move to "common/common-fork-child.c". Update
function to support gdbserver.
(startup_inferior): Likewise.
* gdbcore.h (get_exec_file): Remove declaration.
* gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
instead of "startup_inferior". Call "add_thread_silent" after
"fork_inferior".
* inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
(inf_ptrace_create_inferior): Call "gdb_startup_inferior"
instead of "startup_inferior". Call "add_thread_silent" after
"fork_inferior".
* inferior.h: Include "common-inferior.h".
(trace_start_error): Move to "common/common-utils.h".
(trace_start_error_with_name): Likewise.
(fork_inferior): Move prototype to "nat/fork-inferior.h".
(startup_inferior): Likewise.
(gdb_startup_inferior): New prototype.
* nat/fork-inferior.c: New file, with contents from "fork-child.c".
* nat/fork-inferior.h: New file.
* procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
instead of "startup_inferior". Call "add_thread_silent" after
"fork_inferior".
* target.h (target_terminal_init): Move prototype to
"target/target.h".
(target_terminal_inferior): Likewise.
(target_terminal_ours): Likewise.
* target/target.h (target_terminal_init): New prototype, moved
from "target.h".
(target_terminal_inferior): Likewise.
(target_terminal_ours): Likewise.
* utils.c (gdb_flush_out_err): New function.
gdb/gdbserver/ChangeLog:
2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
Pedro Alves <palves@redhat.com>
* Makefile.in (SFILES): Add "nat/fork-inferior.o".
* configure: Regenerate.
* configure.srv (srv_linux_obj): Add "fork-child.o" and
"fork-inferior.o".
(i[34567]86-*-lynxos*): Likewise.
(spu*-*-*): Likewise.
* fork-child.c: New file.
* linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
and "environ.h".
(linux_ptrace_fun): New function.
(linux_create_inferior): Adjust function prototype to reflect
change on "target.h". Adjust function code to use
"fork_inferior".
(linux_request_interrupt): Delete "signal_pid".
* lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
(lynx_ptrace_fun): New function.
(lynx_create_inferior): Adjust function prototype to reflect
change on "target.h". Adjust function code to use
"fork_inferior".
* nto-low.c (nto_create_inferior): Adjust function prototype and
code to reflect change on "target.h". Update comments.
* server.c: Include "common-inferior.h", "nat/fork-inferior.h",
"common-terminal.h" and "environ.h".
(terminal_fd): Moved to fork-child.c.
(old_foreground_pgrp): Likewise.
(restore_old_foreground_pgrp): Likewise.
(last_status): Make it global.
(last_ptid): Likewise.
(our_environ): New variable.
(startup_with_shell): Likewise.
(program_name): Likewise.
(program_argv): Rename to...
(program_args): ...this.
(wrapper_argv): New variable.
(start_inferior): Delete function.
(get_exec_wrapper): New function.
(get_exec_file): Likewise.
(get_environ): Likewise.
(prefork_hook): Likewise.
(post_fork_inferior): Likewise.
(postfork_hook): Likewise.
(postfork_child_hook): Likewise.
(handle_v_run): Update code to deal with arguments coming from the
remote host. Update calls from "start_inferior" to
"create_inferior".
(captured_main): Likewise. Initialize environment variable. Call
"have_job_control".
* server.h (post_fork_inferior): New prototype.
(get_environ): Likewise.
(last_status): Declare.
(last_ptid): Likewise.
(signal_pid): Likewise.
* spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
(spu_ptrace_fun): New function.
(spu_create_inferior): Adjust function prototype to reflect change
on "target.h". Adjust function code to use "fork_inferior".
* target.c (target_terminal_init): New function.
(target_terminal_inferior): Likewise.
(target_terminal_ours): Likewise.
* target.h: Include <vector>.
(struct target_ops) <create_inferior>: Update prototype.
(create_inferior): Update macro.
* utils.c (gdb_flush_out_err): New function.
* win32-low.c (win32_create_inferior): Adjust function prototype
and code to reflect change on "target.h".
gdb/testsuite/ChangeLog:
2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
* gdb.server/non-existing-program.exp: Update regex in order to
reflect the fact that gdbserver is now using fork_inferior (with a
shell) to startup the inferior.
|
|
This commit moves a few bits responsible for dealing with inferior job
control from GDB to common/, which makes them available to gdbserver.
This is necessary for the upcoming patches that will share
fork_inferior et al between GDB and gdbserver.
We move some parts of gdb/terminal.h to gdb/common/common-terminal.h,
especifically the code that checks terminal features and that are used
to set job_control accordingly.
After sharing parts of gdb/terminal.h, we also to share the two
functions on gdb/inflow.c that are going to be needed by the
fork_inferior rework. They are 'gdb_setpgid' and the new
'have_job_control'. I've also taken the opportunity to give a more
meaningful name to "inflow.c" on common/. Now it is called
"job-control.c" (thanks Pedro for the suggestion).
gdb/ChangeLog:
2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in (SFILES): Add "common/job-control.c".
(HFILES_NO_SRCDIR): Add "common/job-control.h".
(COMMON_OBS): Add "job-control.o".
* common/job-control.c: New file, with contents from
"gdb/inflow.c".
* common/job-control.h: New file, with contents from "terminal.h".
* fork-child.c: Include "job-control.h".
* inflow.c: Include "job-control.h".
(gdb_setpgid): Move to "common/common-inflow.c".
(_initialize_inflow): Move setting of "job_control" to
"handle_job_control".
* terminal.h (job_control): Moved to "common/common-terminal.h".
(gdb_setpgid): Likewise.
* top.c: Include "job_control.h".
* utils.c: Likewise.
(job_control): Moved to "job-control.c".
gdb/gdbserver/ChangeLog:
2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in (SFILE): Add "common/job-control.c".
(OBS): Add "job-control.o".
|
|
In some situations, the dependency tracking files in .deps can refer to
source files that were removed or renamed, leading to errors like:
make: *** No rule to make target `version.c', needed by `version.o'. Stop.
This patch makes the clean target clear the .deps directory, which gives
the user a chance to recover from the error wihtout knowing about the
internals of the build system.
It is already done for GDB. See here for more details:
https://sourceware.org/ml/gdb-patches/2009-03/msg00000.html
gdb/gdbserver/ChangeLog:
* Makefile.in (clean): Clear .deps.
|
|
I noticed that there were some missing files in gdbserver's gitignore
(some generated register format .c files). Of course the easy fix would
be to add those files to .gitignore, but I think we can do a better job,
so that we don't have to worry about adding generated files to
.gitignore or the clean Makefile target.
I suggest naming all generated source files -generated.c. This way, we
can use a single rule in .gitignore and do a "rm -f *-generated.c" to
clean them up.
New in v2:
- Don't rename version.o and xml-builtin.o
gdb/gdbserver/ChangeLog:
* .gitignore: Remove generated files, replace with wildcard.
* (clean): Replace removal of generated files with wildcard.
(version.c): Replace with...
(version-generated.c): ...this.
(xml-builtin.c): Replace with...
(xml-builtin-generated.c): ...this.
(%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
(%.c: *regformats*): Replace with...
(%-generated.c: *regformats*): ...this.
|
|
gdb/gdbserver/ChangeLog:
* Makefile.in (%-ipa.o: %-ipa.c): New rule.
(ax-ipa.o: ax.c): Remove.
(linux-i386-ipa.o: linux-i386-ipa.c): Remove.
(linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
(linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
(linux-s390-ipa.o: linux-s390-ipa.c): Remove.
(linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
|
|
gdb/gdbserver/ChangeLog:
* Makefile.in (%-ipa.o: ../common/%.c): New rule.
(print-utils-ipa.o: ../common/print-utils.c): Remove.
(rsp-low-ipa.o: ../common/rsp-low.c): Remove.
(errors-ipa.o: ../common/errors.c): Remove.
(format-ipa.o: ../common/format.c): Remove.
(common-utils-ipa.o: ../common/common-utils.c): Remove.
|
|
gdb/gdbserver/ChangeLog:
* Makefile.in (%-ipa.o: %.c): New rule.
(tracepoint-ipa.o: tracepoint.c): Remove.
(utils-ipa.o: utils.c): Remove.
(remote-utils-ipa.o: remote-utils.c): Remove.
(regcache-ipa.o: regcache.c): Remove.
(i386-linux-ipa.o: i386-linux.c): Remove.
(i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
(i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
(i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
(i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
(i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
(i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
(amd64-linux-ipa.o: amd64-linux.c): Remove.
(amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
(amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
(amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
(amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
(amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
(aarch64-ipa.o: aarch64.c): Remove.
(s390-linux32-ipa.o: s390-linux32.c): Remove.
(s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
(s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
(s390-linux64-ipa.o: s390-linux64.c): Remove.
(s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
(s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
(s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
(s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
(s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
(s390x-linux64-ipa.o: s390x-linux64.c): Remove.
(s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
(s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
(s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
(s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
(s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
(powerpc-32l-ipa.o: powerpc-32l.c): Remove.
(powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
(powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
(powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
(powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
(powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
(powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
(powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
(powerpc-64l-ipa.o: powerpc-64l.c): Remove.
(powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
(powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
(powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
(powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
(powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
(powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
(tdesc-ipa.o: tdesc.c): Remove.
(x32-linux-ipa.o: x32-linux.c): Remove.
(x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
(x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
|
|
gdb/gdbserver/ChangeLog:
* Makefile.in (%.o: ../arch/%.c): New rule.
(arm.o: ../arch/arm.c): Remove.
(arm-linux.o: ../arch/arm-linux.c): Remove.
(arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
(aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
|
|
gdb/gdbserver/ChangeLog:
* Makefile.in (%.o: ../nat/%.c): New rule.
(x86-dregs.o: ../nat/x86-dregs.c): Remove.
(amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
(linux-btrace.o: ../nat/linux-btrace.c): Remove.
(linux-osdata.o: ../nat/linux-osdata.c): Remove.
(linux-procfs.o: ../nat/linux-procfs.c): Remove.
(linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
(linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
(mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
(ppc-linux.o: ../nat/ppc-linux.c): Remove.
(linux-personality.o: ../nat/linux-personality.c): Remove.
(aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
(aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
(x86-linux.o: ../nat/x86-linux.c): Remove.
(x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
(linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
|
|
gdb/gdbserver/ChangeLog:
* Makefile.in (%.o: ../common/%.c): New rule.
(signals.o: ../common/signals.c): Remove.
(print-utils.o: ../common/print-utils.c): Remove.
(rsp-low.o: ../common/rsp-low.c): Remove.
(common-utils.o: ../common/common-utils.c): Remove.
(posix-strerror.o: ../common/posix-strerror.c): Remove.
(mingw-strerror.o: ../common/mingw-strerror.c): Remove.
(vec.o: ../common/vec.c): Remove.
(gdb_vecs.o: ../common/gdb_vecs.c): Remove.
(xml-utils.o: ../common/xml-utils.c): Remove.
(ptid.o: ../common/ptid.c): Remove.
(buffer.o: ../common/buffer.c): Remove.
(format.o: ../common/format.c): Remove.
(filestuff.o: ../common/filestuff.c): Remove.
(agent.o: ../common/agent.c): Remove.
(errors.o: ../common/errors.c): Remove.
(environ.o: ../common/environ.c): Remove.
(common-debug.o: ../common/common-debug.c): Remove.
(cleanups.o: ../common/cleanups.c): Remove.
(common-exceptions.o: ../common/common-exceptions.c): Remove.
(fileio.o: ../common/fileio.c): Remove.
(common-regcache.o: ../common/common-regcache.c): Remove.
(signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
(new-op.o: ../common/new-op.c): Remove.
(btrace-common.o: ../common/btrace-common.c): Remove.
|
|
gdb/gdbserver/ChangeLog:
* Makefile.in (%.o: ../target/%.c): New rule.
(waitstatus.o: ../target/waitstatus.c): Remove.
|
|
gdb/gdbserver/ChangeLog:
* Makefile.in
(%.c: ../regformats/%.dat,
(%.c: ../regformats/arm/%.dat,
(%.c: ../regformats/i386/%.dat,
(%.c: ../regformats/rs6000/%.dat): New rules.
(aarch64.c): Remove.
(reg-arm.c): Remove.
(arm-with-iwmmxt.c): Remove.
(arm-with-vfpv2.c): Remove.
(arm-with-vfpv3.c): Remove.
(arm-with-neon.c): Remove.
(reg-bfin.c): Remove.
(reg-cris.c): Remove.
(reg-crisv32.c): Remove.
(i386.c): Remove.
(i386-linux.c): Remove.
(i386-avx.c): Remove.
(i386-avx-linux.c): Remove.
(i386-avx-avx512.c): Remove.
(i386-avx-avx512-linux.c): Remove.
(i386-mpx.c): Remove.
(i386-mpx-linux.c): Remove.
(i386-avx-mpx-avx512-pku.c): Remove.
(i386-avx-mpx-avx512-pku-linux.c): Remove.
(i386-avx-mpx.c): Remove.
(i386-avx-mpx-linux.c): Remove.
(i386-mmx.c): Remove.
(i386-mmx-linux.c): Remove.
(reg-ia64.c): Remove.
(reg-m32r.c): Remove.
(reg-m68k.c): Remove.
(reg-cf.c): Remove.
(mips-linux.c): Remove.
(mips-dsp-linux.c): Remove.
(mips64-linux.c): Remove.
(mips64-dsp-linux.c): Remove.
(nios2-linux.c): Remove.
(powerpc-32.c): Remove.
(powerpc-32l.c): Remove.
(powerpc-altivec32l.c): Remove.
(powerpc-cell32l.c): Remove.
(powerpc-vsx32l.c): Remove.
(powerpc-isa205-32l.c): Remove.
(powerpc-isa205-altivec32l.c): Remove.
(powerpc-isa205-vsx32l.c): Remove.
(powerpc-e500l.c): Remove.
(powerpc-64l.c): Remove.
(powerpc-altivec64l.c): Remove.
(powerpc-cell64l.c): Remove.
(powerpc-vsx64l.c): Remove.
(powerpc-isa205-64l.c): Remove.
(powerpc-isa205-altivec64l.c): Remove.
(powerpc-isa205-vsx64l.c): Remove.
(s390-linux32.c): Remove.
(s390-linux32v1.c): Remove.
(s390-linux32v2.c): Remove.
(s390-linux64.c): Remove.
(s390-linux64v1.c): Remove.
(s390-linux64v2.c): Remove.
(s390-te-linux64.c): Remove.
(s390-vx-linux64.c): Remove.
(s390-tevx-linux64.c): Remove.
(s390x-linux64.c): Remove.
(s390x-linux64v1.c): Remove.
(s390x-linux64v2.c): Remove.
(s390x-te-linux64.c): Remove.
(s390x-vx-linux64.c): Remove.
(s390x-tevx-linux64.c): Remove.
(tic6x-c64xp-linux.c): Remove.
(tic6x-c64x-linux.c): Remove.
(tic6x-c62x-linux.c): Remove.
(reg-sh.c): Remove.
(reg-sparc64.c): Remove.
(reg-spu.c): Remove.
(amd64.c): Remove.
(amd64-linux.c): Remove.
(amd64-avx.c): Remove.
(amd64-avx-linux.c): Remove.
(amd64-avx-avx512.c): Remove.
(amd64-avx-avx512-linux.c): Remove.
(amd64-mpx.c): Remove.
(amd64-mpx-linux.c): Remove.
(amd64-avx-mpx-avx512-pku.c): Remove.
(amd64-avx-mpx-avx512-pku-linux.c): Remove.
(amd64-avx-mpx.c): Remove.
(amd64-avx-mpx-linux.c): Remove.
(x32.c): Remove.
(x32-linux.c): Remove.
(x32-avx.c): Remove.
(x32-avx-linux.c): Remove.
(x32-avx-avx512.c): Remove.
(x32-avx-avx512-linux.c): Remove.
(reg-xtensa.c): Remove.
(reg-tilegx.c): Remove.
(reg-tilegx32.c): Remove.
|
|
We will need access to the environment functions when we share
fork_inferior between GDB and gdbserver, therefore we simply make the
API on gdb/environ.[ch] available on common/. No extra adjustments
are needed to make it compile on gdbserver.
gdb/ChangeLog:
2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in (SFILES): Replace "environ.c" with
"common/environ.c".
(HFILES_NO_SRCDIR): Likewise, for "environ.h".
* environ.c: Include "common-defs.h" instead of "defs.h. Moved
to...
* common/environ.c: ... here.
* environ.h: Moved to...
* common/environ.h: ... here.
gdb/gdbserver/ChangeLog:
2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in (SFILES): Add "common/environ.c".
(OBJS): Add "common/environ.h".
|