Age | Commit message (Collapse) | Author | Files | Lines |
|
Since we now rely on PTRACE_EVENT_CLONE being available (added in
Linux 2.5.46), we're relying on NPTL.
This commit removes the support for older LinuxThreads, as well as the
workarounds for vendor 2.4 kernels with NPTL backported.
- Rely on tkill being available.
- Assume gdb doesn't get cancel signals.
- Remove code that checks the LinuxThreads restart and cancel signals
in the inferior.
- Assume that __WALL is available.
- Assume that non-leader threads report WIFEXITED.
- Thus, no longer need to send signal 0 to check whether threads are
still alive.
- Update comments throughout.
Tested on x86_64 Fedora 20, native and gdbserver.
gdb/ChangeLog:
* configure.ac: Remove tkill checks.
* configure, config.in: Regenerate.
* linux-nat.c: Remove HAVE_TKILL_SYSCALL check. Update top level
comments.
(linux_nat_post_attach_wait): Remove 'cloned' parameter. Use
__WALL.
(attach_proc_task_lwp_callback): Don't set the cloned flag.
(linux_nat_attach): Adjust.
(kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
to 'kill'.
(linux_handle_extended_wait): Use __WALL. Don't set the cloned
flag.
(wait_lwp): Use __WALL. Update comments.
(running_callback, stop_and_resume_callback): Delete.
(linux_nat_filter_event): Don't stop and resume all lwps. Don't
check if the event LWP has previously exited.
(check_zombie_leaders): Update comments.
(linux_nat_wait_1): Use __WALL.
(kill_wait_callback): Don't handle clone processes separately.
Use __WALL instead.
(linux_thread_alive): Delete.
(linux_nat_thread_alive): Return true as long as the LWP is in the
LWP list.
(linux_nat_update_thread_list): Assume the kernel supports
PTRACE_EVENT_CLONE.
(get_signo): Delete.
(lin_thread_get_thread_signals): Remove LinuxThreads references.
No longer check __pthread_sig_restart / __pthread_sig_cancel in
the inferior.
* linux-nat.h (struct lwp_info) <cloned>: Delete field.
* linux-thread-db.c: Update comments.
(_initialize_thread_db): Remove LinuxThreads references.
* nat/linux-waitpid.c (my_waitpid): No longer emulate __WALL.
Pass down flags unmodified.
* linux-waitpid.h (my_waitpid): Update documentation.
gdb/gdbserver/ChangeLog:
* linux-low.c (linux_kill_one_lwp): Remove references to
LinuxThreads.
(kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
to 'kill'.
(linux_init_signals): Delete.
(initialize_low): Adjust.
* thread-db.c (thread_db_init): Remove LinuxThreads reference.
|
|
Ref: https://sourceware.org/ml/gdb/2015-12/msg00024.html
We have code in configure.ac that tries to detect whether the compiler
supports each warning and suppress it if not, but that doesn't work
with "-Wno-" options, because gcc doesn't error out for
-Wno-unknown-warning unless other diagnostics are being produced.
See https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html.
Handle this by checking whether -Wfoo works when we actually want
-Wno-foo.
gdb/ChangeLog:
2015-12-16 Pedro Alves <palves@redhat.com>
* configure.ac (compiler warning flags): When testing a
-Wno-foo option, check whether -Wfoo works instead.
* configure: Regenerate.
gdb/gdbserver/ChangeLog:
2015-12-16 Pedro Alves <palves@redhat.com>
* configure.ac (compiler warning flags): When testing a
-Wno-foo option, check whether -Wfoo works instead.
* configure: Regenerate.
|
|
Both x86_64 GNU/Linux and x86_64 mingw-w64 build cleanly with
--enable-targets=all. This enables -Werror by default in C++ mode
too, in order to let the buildbot catch C++ build regressions for us.
gdb/ChangeLog:
2015-11-19 Pedro Alves <palves@redhat.com>
* configure.ac (ERROR_ON_WARNING): Don't check whether in C++
mode.
* configure: Regenerate.
gdb/gdbserver/ChangeLog:
2015-11-19 Pedro Alves <palves@redhat.com>
* configure.ac (ERROR_ON_WARNING): Don't check whether in C++
mode.
* configure: Regenerate.
|
|
Both x86_64 GNU/Linux and x86_64 mingw-w64 build cleanly with
--enable-targets=all. Let's drop the -fpermissive hack, in order to
let the buildbot catch C++ build regressions for us.
gdb/ChangeLog:
2015-11-19 Pedro Alves <palves@redhat.com>
* build-with-cxx.m4 (GDB_AC_BUILD_WITH_CXX): Remove -fpermissive.
* configure: Regenerate.
gdb/gdbserver/ChangeLog:
2015-11-19 Pedro Alves <palves@redhat.com>
* configure: Regenerate.
|
|
Since we're using sighandler_t, nothing else refers to RETSIGTYPE in
gdb.
(Actually, given gdb/remote.c has been assuming signal handlers return
void for a long time, we could have gotten get rid of this even
without gnulib's sighandler_t.)
gdb/ChangeLog:
2015-08-27 Pedro Alves <palves@redhat.com>
* configure.ac: Remove AC_TYPE_SIGNAL call.
* configure, config.in: Regenerate.
|
|
Intel(R) Processor Trace support requires a recent linux/perf_event.h header.
When GDB is built on an older system, Intel(R) Processor Trace will not be
available and there is no indication in the configure and build log as to
what went wrong.
Check for a compatible linux/perf_event.h at configure-time.
gdb/
* configure.ac: Check for PERF_ATTR_SIZE_VER5 in linux/perf_event.h
* configure: Regenerate.
|
|
* Makefile.def (libiconv): Define bootstrap=true.
Mark pdf/html/info as missing.
(configure-gcc): Depend on all-libiconv.
(all-gcc): Ditto.
(configure-libcpp): Ditto.
(all-libcpp): Ditto.
(configure-intl): Ditto.
(all-intl): Ditto.
* Makefile.in: Regenerate.
binutils/
* configure: Regenerate.
gdb/
* Makefile.in (LIBICONV): Define.
(CLIBS): Add LIBICONV.
* acinclude.m4: Use config/iconv.m4 instead of custom AM_ICONV.
* configure: Regenerate.
|
|
Building in C++ mode issues ~40 warnings like this:
../../src/gdb/linux-nat.c: In function ‘int linux_handle_extended_wait(lwp_info*, int, int)’:
../../src/gdb/linux-nat.c:2016:51: warning: invalid conversion from ‘int’ to ‘__ptrace_request’ [-fpermissive]
ptrace (PTRACE_GETEVENTMSG, pid, 0, &new_pid);
The issue is that in glibc, ptrace's first parameter is an enum.
That's not a problem if we pick the PTRACE_XXX requests from
sys/ptrace.h, as those will be values of the corresponding enum.
However, we have fallback definitions for PTRACE_XXX symbols when the
system headers miss them (such as PTRACE_GETEVENTMSG above), and those
are plain integer constants. E.g., nat/linux-ptrace.h:
#define PTRACE_GETEVENTMSG 0x4201
One idea would be to fix this by defining those fallbacks like:
-#define PTRACE_GETEVENTMSG 0x4201
+#define PTRACE_GETEVENTMSG ((enum __ptrace_request) 0x4201)
However, while glibc's ptrace uses enum __ptrace_request for first
parameter:
extern long int ptrace (enum __ptrace_request __request, ...) __THROW;
other libc's, like e.g., Android's bionic do not -- in that case, the
first parameter is int:
long ptrace(int request, pid_t pid, void * addr, void * data);
So the fix I came up is to make configure/ptrace.m4 also detect the
type of the ptrace's first parameter and defin PTRACE_TYPE_ARG1, as
already does the for parameters 3-4, and then simply wrap ptrace with
a macro that casts the first argument to the detected type. (I'm
leaving adding a nicer wrapper for when we drop building in C).
While this adds the wrapper, GNU/Linux files won't use it until the
next patch, which makes all native GNU/Linux files include
gdb_ptrace.h.
gdb/ChangeLog:
2015-07-24 Pedro Alves <palves@redhat.com>
* ptrace.m4 (ptrace tests): Test in C++ mode. Try with 'enum
__ptrace_request as first parameter type instead of int.
(PTRACE_TYPE_ARG1): Define.
* nat/gdb_ptrace.h [!PTRACE_TYPE_ARG5] (ptrace): Define as wrapper
that casts first argument to PTRACE_TYPE_ARG1.
* config.in: Regenerate.
* configure: Regenerate.
gdb/gdbserver/ChangeLog:
2015-07-24 Pedro Alves <palves@redhat.com>
* config.in: Regenerate.
* configure: Regenerate.
|
|
ddc98fbf2fd9e244a215a4d09e559180dc573a14 Create empty nat/linux-maps.[ch] and common/target-utils.[ch]
6e5b4429db0d66e2d0b27e1bcfe4709f3dae73ed Move gdb_regex* to common/
f7af1fcd759fa126612018a5916cf808df7bb8bc Prepare linux_find_memory_regions_full & co. for move
9904185cfde13d6c6849f1f042c8e3b74974cf08 Move linux_find_memory_regions_full & co.
700ca40f6fc1addd7238f4ab57f76c095ad3c99f gdbserver build-id attribute generator
ca5268b6be265580b91ef75c1a1a9815f581ae42 Validate symbol file using build-id
0a94970d663a053c523f23ac0d71deb25a77f709 Tests for validate symbol file using build-id
gdb/ChangeLog
2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
Revert the previous 6 commits:
Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
Move gdb_regex* to common/
Prepare linux_find_memory_regions_full & co. for move
Move linux_find_memory_regions_full & co.
gdbserver build-id attribute generator
Validate symbol file using build-id
gdb/gdbserver/ChangeLog
2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
Revert the previous 3 commits:
Move gdb_regex* to common/
Move linux_find_memory_regions_full & co.
gdbserver build-id attribute generator
gdb/doc/ChangeLog
2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
Revert the previous 2 commits:
gdbserver build-id attribute generator
Validate symbol file using build-id
gdb/testsuite/ChangeLog
2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
Revert the previous commit:
Tests for validate symbol file using build-id.
|
|
Later patches need regex support also in gdbserver.
gdb/ChangeLog
2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
* Makefile.in (HFILES_NO_SRCDIR): Change gdb_regex.h to
common/gdb_regex.h.
(COMMON_OBS): Add gdb_regex.o.
(gdb_regex.o): New.
* common/common.m4 (GDB_AC_COMMON): Add gdb_use_included_regex,
--without-included-regex and USE_INCLUDED_REGEX.
* common/gdb_regex.c: New file from utils.c functions.
* common/gdb_regex.h: Move it here from gdb_regex.h, update include
file wrapping define name.
* configure: Rebuilt.
* configure.ac (gdb_use_included_regex, --without-included-regex)
(USE_INCLUDED_REGEX): Move them to common/common.m4.
* gdb_regex.h: Move it to common/gdb_regex.h.
* utils.c: Remove include gdb_regex.h.
(do_regfree_cleanup, make_regfree_cleanup, get_regcomp_error)
(compile_rx_or_error): Move them to common/gdb_regex.c.
gdb/gdbserver/ChangeLog
2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
* Makefile.in (OBS): Add gdb_regex.o.
(gdb_regex.o): New.
* config.in: Rebuilt.
* configure: Rebuilt.
|
|
Check for libipt, an Intel(R) Processor Trace decoder library. The sources
can be found on github at:
https://github.com/01org/processor-trace
gdb/
* configure.ac: Check for libipt
* configure: Regenerate.
* config.in: Regenerate.
* Makefile.in (LIBIPT): New.
(CLIBS): Add $LIBIPT.
* NEWS: document new configure options
|
|
This commit introduces new shared files nat/linux-namespaces.[ch]
containing code to support Linux namespaces that will be used by
both GDB and gdbserver.
gdb/ChangeLog:
* configure.ac (AC_CHECK_FUNCS): Add setns.
* config.in: Regenerate.
* configure: Likewise.
* nat/linux-namespaces.h: New file.
* nat/linux-namespaces.c: Likewise.
* Makefile.in (HFILES_NO_SRCDIR): Add nat/linux-namespaces.h.
(linux-namespaces.o): New rule.
* config/aarch64/linux.mh (NATDEPFILES): Add linux-namespaces.o.
* config/alpha/alpha-linux.mh (NATDEPFILES): Likewise.
* config/arm/linux.mh (NATDEPFILES): Likewise.
* config/i386/linux.mh (NATDEPFILES): Likewise.
* config/i386/linux64.mh (NATDEPFILES): Likewise.
* config/ia64/linux.mh (NATDEPFILES): Likewise.
* config/m32r/linux.mh (NATDEPFILES): Likewise.
* config/m68k/linux.mh (NATDEPFILES): Likewise.
* config/mips/linux.mh (NATDEPFILES): Likewise.
* config/pa/linux.mh (NATDEPFILES): Likewise.
* config/powerpc/linux.mh (NATDEPFILES): Likewise.
* config/powerpc/ppc64-linux.mh (NATDEPFILES): Likewise.
* config/powerpc/spu-linux.mh (NATDEPFILES): Likewise.
* config/s390/linux.mh (NATDEPFILES): Likewise.
* config/sparc/linux.mh (NATDEPFILES): Likewise.
* config/sparc/linux64.mh (NATDEPFILES): Likewise.
* config/tilegx/linux.mh (NATDEPFILES): Likewise.
* config/xtensa/linux.mh (NATDEPFILES): Likewise.
gdb/gdbserver/ChangeLog:
* configure.ac (AC_CHECK_FUNCS): Add setns.
* config.in: Regenerate.
* configure: Likewise.
* Makefile.in (SFILES): Add nat/linux-namespaces.c.
(linux-namespaces.o): New rule.
* configure.srv (srv_linux_obj): Add linux-namespaces.o.
|
|
* acinclude.m4: (GDB_AC_CHECK_BFD): Set ZLIBDIR with $zlibdir.
Replace $zlibdir with $ZLIBDIR in LDFLAGS.
* configure: Regenerated.
|
|
Currently building gdb is impossible without an installed termcap or
curses library. But, GDB already has a very minimal termcap in the
tree to handle this situation for Windows -- gdb/stub-termcap.c. This
patch makes that the fallback for all hosts.
Testing this on GNU/Linux (by simply hacking away the termcap/curses
detection in gdb/configure.ac), we trip on:
../readline/libreadline.a(terminal.o): In function `_rl_init_terminal_io':
/home/pedro/gdb/mygit/src/readline/terminal.c:527: undefined reference to `PC'
/home/pedro/gdb/mygit/src/readline/terminal.c:528: undefined reference to `BC'
/home/pedro/gdb/mygit/src/readline/terminal.c:529: undefined reference to `UP'
/home/pedro/gdb/mygit/src/readline/terminal.c:538: undefined reference to `PC'
/home/pedro/gdb/mygit/src/readline/terminal.c:539: undefined reference to `BC'
/home/pedro/gdb/mygit/src/readline/terminal.c:540: undefined reference to `UP'
These are globals that are normally defined by termcap (or ncurses'
termcap emulation).
Now, we could just define replacements in stub-termcap.c, but
readline/terminal.c (at least the copy in our tree) has this:
#if !defined (__linux__) && !defined (NCURSES_VERSION)
# if defined (__EMX__) || defined (NEED_EXTERN_PC)
extern
# endif /* __EMX__ || NEED_EXTERN_PC */
char PC, *BC, *UP;
#endif /* !__linux__ && !NCURSES_VERSION */
which can result in readline defining the globals too. That will
usually work out in C, given that "-fcommon" is usually the default
for C compilers, but that won't work for C++, or C with -fno-common
(link fails with "multiple definition" errors)...
Mirroring those #ifdef conditions in the stub termcap screams
"brittle" to me -- I can see them changing in latter readline
versions.
Work around that by simply using __attribute__((weak)).
Windows/PE/COFF's do support weak, but not on gcc 3.4 based toolchains
(4.8.x does work). Given the file never needed the variables while it
was Windows-only, just continue not defining them there. All other
supported hosts should support this.
gdb/ChangeLog:
2015-04-06 Pedro Alves <palves@redhat.com>
Bernd Edlinger <bernd.edlinger@hotmail.de>
* configure.ac: Remove the mingw32-specific stub-termcap.o
fallback, and instead fallback to the stub termcap on all hosts.
* configure: Regenerate.
* stub-termcap.c [!__MINGW32__] (PC, BC, UP): Define as weak
symbols.
|
|
bfd/
* configure: Regenerated.
binutils/
* configure: Regenerated.
gas/
* configure: Regenerated.
gdb/
* Makefile.in (top_srcdir): New.
* configure: Regenerated.
gold/
* configure: Regenerated.
|
|
bfd/
2015-04-01 H.J. Lu <hongjiu.lu@intel.com>
* configure: Regenerated.
binutils/
2015-04-01 H.J. Lu <hongjiu.lu@intel.com>
* configure: Regenerated.
gas/
2015-04-01 H.J. Lu <hongjiu.lu@intel.com>
* configure: Regenerated.
gdb/
2015-04-01 H.J. Lu <hongjiu.lu@intel.com>
* configure: Regenerated.
|
|
This patch adds --with-system-zlib and removes --with-zlib in gdb.
* Makefile.in (ZLIB): New.
(ZLIBINC): Likewise.
(INTERNAL_CFLAGS_BASE): Add $(ZLIBINC).
(CLIBS): Add $(ZLIB).
* acinclude.m4: (GDB_AC_CHECK_BFD): Add $zlibdir to LDFLAGS.
Add -lz to LIBS.
* gdb_bfd.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
* top.c (print_gdb_configuration): Remove --with-zlib and
--without-zlib.
* config.in: Regenerated.
* configure: Likewise.
|
|
IIUC it is a pre-requisite for IPv6 support, some UNICes do not support
getaddrinfo required for IPv6. But coincidentally such UNICes are no longer
really supported by GDB. Therefore it was concluded we can remove all such
UNICes and then we can implement IPv6 easily with getaddrinfo.
In mail
Re: getaddrinfo available on all GDB hosts? [Re: [PATCH v2] Add IPv6 support for remote TCP connections]
Message-ID: <20140211034157.GG5485@adacore.com>
https://sourceware.org/ml/gdb-patches/2014-02/msg00333.html
Joel said:
So I chose HP-UX first for this patch.
gdb/ChangeLog
2014-10-16 Jan Kratochvil <jan.kratochvil@redhat.com>
Remove HPUX.
* Makefile.in (ALL_64_TARGET_OBS): Remove ia64-hpux-tdep.o.
(ALL_TARGET_OBS): Remove hppa-hpux-tdep.o, solib-som.o and solib-pa64.o.
(HFILES_NO_SRCDIR): Remove solib-som.h, inf-ttrace.h, solib-pa64.h and
ia64-hpux-tdep.h, solib-ia64-hpux.h.
(ALLDEPFILES): Remove hppa-hpux-tdep.c, hppa-hpux-nat.c,
ia64-hpux-nat.c, ia64-hpux-tdep.c, somread.c and solib-som.c.
* config/djgpp/fnchange.lst: Remove hppa-hpux-nat.c and
hppa-hpux-tdep.c.
* config/ia64/hpux.mh: Remove file.
* config/pa/hpux.mh: Remove file.
* configure: Rebuilt.
* configure.ac (dlgetmodinfo, somread.o): Remove.
* configure.host (hppa*-*-hpux*, ia64-*-hpux*): Make them obsolete.
(ia64-*-hpux*): Remove its float format exception.
* configure.tgt (hppa*-*-hpux*, ia64-*-hpux*): Make them obsolete.
* hppa-hpux-nat.c: Remove file.
* hppa-hpux-tdep.c: Remove file.
* hppa-tdep.c (struct hppa_unwind_info, struct hppa_objfile_private):
Move them here from hppa-tdep.h
(hppa_objfile_priv_data, hppa_init_objfile_priv_data): Make it static.
(hppa_frame_prev_register_helper): Remove HPPA_FLAGS_REGNUM exception.
* hppa-tdep.h (struct hppa_unwind_info, struct hppa_objfile_private):
Move them to hppa-tdep.c.
(hppa_objfile_priv_data, hppa_init_objfile_priv_data): Remove
declarations.
* ia64-hpux-nat.c: Remove file.
* ia64-hpux-tdep.c: Remove file.
* ia64-hpux-tdep.h: Remove file.
* inf-ttrace.c: Remove file.
* inf-ttrace.h: Remove file.
* solib-ia64-hpux.c: Remove file.
* solib-ia64-hpux.h: Remove file.
* solib-pa64.c: Remove file.
* solib-pa64.h: Remove file.
* solib-som.c: Remove file.
* solib-som.h: Remove file.
* somread.c: Remove file.
|
|
Use kinfo_getvmmap from libutil on FreeBSD to enumerate memory
regions in a running process instead of /proc/<pid>/map. FreeBSD systems
do not mount procfs by default, but kinfo_getvmmap uses a sysctl that
is always available.
Skip memory regions for devices as well as regions an application has
requested to not be dumped via the MAP_NOCORE flag to mmap or
MADV_NOCORE advice to madvise.
gdb/ChangeLog:
* configure.ac: AC_CHECK_LIB(util, kinfo_getvmmap).
* configure: Regenerate.
* config.in: Regenerate.
* fbsd-nat.c [!HAVE_KINFO_GETVMMAP] (fbsd_read_mapping): Don't
define.
(fbsd_find_memory_regions): Use kinfo_getvmmap to
enumerate memory regions if present.
|
|
gdb/ChangeLog:
* guile/guile.c (_initialize_guile): Disable automatic
finalization, if Guile offers us that possibility.
* guile/guile.c (call_initialize_gdb_module):
* guile/scm-safe-call.c (gdbscm_with_catch): Arrange to run
finalizers in appropriate places.
* config.in (HAVE_GUILE_MANUAL_FINALIZATION): New definition.
* configure.ac (AC_TRY_LIBGUILE): Add a check for
scm_set_automatic_finalization_enabled.
* configure: Regenerated.
|
|
Whoops, these are C specific, but I somehow missed the warnings before:
cc1plus: warning: command line option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wmissing-parameter-type’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wold-style-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wold-style-definition’ is valid for C/ObjC but not for C++ [enabled by default]
gdb/ChangeLog:
2015-03-07 Pedro Alves <palves@redhat.com>
* configure.ac (build_warnings): Move -Wmissing-prototypes
-Wdeclaration-after-statement -Wmissing-parameter-type
-Wold-style-declaration -Wold-style-definition to the C-specific
set.
* configure: Regenerate.
gdb/gdbserver/ChangeLog:
2015-03-07 Pedro Alves <palves@redhat.com>
* configure.ac (build_warnings): Move
-Wdeclaration-after-statement to the C-specific set.
* configure: Regenerate.
|
|
This new option, disabled by default for now, allows specifying
whether to build GDB, GDBserver, and friends with a C++ (98/03)
compiler.
The name of the switch should be familiar to those who followed GCC's
own C++ conversion process.
. Adding -fpermissive to COMPILER in C++ mode (see the new
build-with-cxx.m4 file) makes errors like these be warnings instead:
gdb/infrun.c:6597:1: error: initializing argument 1 of ‘void sig_print_info(gdb_signal)’ [-fpermissive]
sig_print_info (enum gdb_signal oursig)
^
gdb/infrun.c: In function ‘void do_restore_infcall_suspend_state_cleanup(void*)’:
gdb/infrun.c:7164:39: error: invalid conversion from ‘void*’ to ‘infcall_suspend_state*’ [-fpermissive]
restore_infcall_suspend_state (state);
^
so that the compiler carries on compiling the file. -Werror still
catches the warnings, so nothing is lost, only our lifes are made
easier by concentrating on getting other more important things out of
the way first.
There's no way to quiet those warnings. Until they're all fixed, when
building in C++ mode, -Werror is disabled by default.
. Adding -Wno-narrowing suppresses thousands of instances of this warning:
gdb/arm-linux-tdep.c:439:1: error: narrowing conversion of ‘-1’ from ‘int’ to ‘ULONGEST {aka long unsigned int}’ inside { } is ill-formed in C++11 [-Werror=narrowing]
gdb/arm-linux-tdep.c:439:1: error: narrowing conversion of ‘-1l’ from ‘LONGEST {aka long int}’ to ‘ULONGEST {aka long unsigned int}’ inside { } is ill-formed in C++11 [-Werror=narrowing]
gdb/arm-linux-tdep.c:450:1: error: narrowing conversion of ‘-1’ from ‘int’ to ‘ULONGEST {aka long unsigned int}’ inside { } is ill-formed in C++11 [-Werror=narrowing]
We can defer handling those until we target C++11.
. Adding -Wno-sign-compare suppresses thousands of instances of this warning:
gdb/linux-record.c:1763:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (tmpulongest == tdep->fcntl_F_GETLK64)
^
. Adding -Wno-write-strings suppresses thousands of instances of this warning:
gdb/mi/mi-cmd-var.c: In function ‘void mi_cmd_var_show_attributes(char*, char**, int)’:
gdb/mi/mi-cmd-var.c:514:12: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
attstr = "editable";
^
gdb/mi/mi-cmd-var.c:516:12: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
attstr = "noneditable";
^
For now, it's best to hide these warnings from view until we're
'-fpermissive'-clean, and can thus start building with -Werror.
The C compiler has always managed to build working GDBs with these
issues in the code, so a C++ compiler should too.
gdb/ChangeLog:
2015-02-27 Pedro Alves <palves@redhat.com>
* Makefile.in (COMPILER): New, get it from autoconf.
(COMPILE.pre, CC_LD): Use COMPILER.
(CXX): Get from autoconf instead.
(CXX_FOR_TARGET): Default to g++ instead of gcc.
* acinclude.m4: Include build-with-cxx.m4.
* build-with-cxx.m4: New file.
* configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
Disable -Werror by default if building in C++ mode.
(build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
-Wno-narrowing in C++ mode. Only enable -Wpointer-sign in C mode.
Run supported-warning-flags tests with the C++ compiler.
Save/restore CXXFLAGS too.
* configure: Regenerate.
gdb/gdbserver/ChangeLog:
2015-02-27 Pedro Alves <palves@redhat.com>
* Makefile.in (COMPILER): New, get it from autoconf.
(CXX): Get from autoconf instead.
(COMPILE.pre): Use COMPILER.
(CC-LD): Rename to ...
(CC_LD): ... this. Use COMPILER.
(gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
(CXX_FOR_TARGET): Default to g++ instead of gcc.
* acinclude.m4: Include build-with-cxx.m4.
* configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
Disable -Werror by default if building in C++ mode.
(build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
-Wno-narrowing in C++ mode. Run supported-warning-flags tests with
the C++ compiler. Save/restore CXXFLAGS too.
* configure: Regenerate.
|
|
Converting GDB to be a C++ program, I stumbled on 'basename' issues,
like:
src/gdb/../include/ansidecl.h:169:64: error: new declaration ‘char* basename(const char*)’
/usr/include/string.h:597:26: error: ambiguates old declaration ‘const char* basename(const char*)’
which I believe led to this bit in gold's configure.ac:
dnl We have to check these in C, not C++, because autoconf generates
dnl tests which have no type information, and current glibc provides
dnl multiple declarations of functions like basename when compiling
dnl with C++.
AC_CHECK_DECLS([basename, ffs, asprintf, vasprintf, snprintf, vsnprintf, strverscmp])
These checks IIUC intend to generate all the HAVE_DECL_FOO symbols
that libiberty.h and ansidecl.h check.
GDB is missing these checks currently, which results in the conflict
shown above.
This adds an m4 file that both GDB and GDBserver's configury use to
pull in the autoconf checks that libiberty clients needs done in order
to use these libiberty.h/ansidecl.h.
gdb/ChangeLog:
2015-02-27 Pedro Alves <palves@redhat.com>
* libiberty.m4: New file.
* acinclude.m4: Include libiberty.m4.
* configure.ac: Call libiberty_INIT.
* config.in, configure: Regenerate.
gdb/gdbserver/
2015-02-27 Pedro Alves <palves@redhat.com>
* acinclude.m4: Include libiberty.m4.
* configure.ac: Call libiberty_INIT.
* config.in, configure: Regenerate.
|
|
Preparation for using this on all hosts.
Confirmed that --host=x86_64-w64-mingw32 still builds the stub
termcap.
gdb/ChangeLog:
2015-02-26 Pedro Alves <palves@redhat.com>
* windows-termcap.c: Rename to ...
* stub-termcap.c: ... this. Adjust header line.
* Makefile.in (SFILES): Refer to stub-termcap.c instead of
windows-termcap.c.
* configure: Regenerate.
* configure.ac: Refer to stub-termcap.o instead of
windows-termcap.o.
* gdb_curses.h: Mention stub-termcap.c instead of
windows-termcap.c.
|
|
This patch introduces a new M4 macro GDB_AC_TRANSFORM to avoid repeating
the common idiom which is the transformation of target program names,
i.e. from gdb to sparc64-linux-gnu-gdb. It also makes gdb/configure.ac
and gdb/testsuite/configure.ac to use the new macro.
gdb/ChangeLog:
2015-02-18 Jose E. Marchesi <jose.marchesi@oracle.com>
* configure: Regenerated.
* configure.ac: Use GDB_AC_TRANSFORM.
* Makefile.in (aclocal_m4_deps): Added transform.m4.
* acinclude.m4: sinclude transform.m4.
* transform.m4: New file.
(GDB_AC_TRANSFORM): New macro.
gdb/testsuite/ChangeLog:
2015-02-18 Jose E. Marchesi <jose.marchesi@oracle.com>
* configure: Regenerated.
* configure.ac: Use GDB_AC_TRANSFORM.
* aclocal.m4: sinclude ../transform.m4.
|
|
This patch adds a new type of probe to GDB: the DTrace USDT probes. The new
type is added by providing functions implementing all the entries of the
`probe_ops' structure defined in `probe.h'. The implementation is
self-contained and does not depend on DTrace source code in any way.
gdb/ChangeLog:
2015-02-7 Jose E. Marchesi <jose.marchesi@oracle.com>
* breakpoint.c (BREAK_ARGS_HELP): Help string updated to mention
the -probe-dtrace new vpossible value for PROBE_MODIFIER.
* configure.ac (CONFIG_OBS): dtrace-probe.o added if BFD can
handle ELF files.
* Makefile.in (SFILES): dtrace-probe.c added.
* configure: Regenerate.
* dtrace-probe.c: New file.
(SHT_SUNW_dof): New constant.
(dtrace_probe_type): New enum.
(dtrace_probe_arg): New struct.
(dtrace_probe_arg_s): New typedef.
(struct dtrace_probe_enabler): New struct.
(dtrace_probe_enabler_s): New typedef.
(dtrace_probe): New struct.
(dtrace_probe_is_linespec): New function.
(dtrace_dof_sect_type): New enum.
(dtrace_dof_dofh_ident): Likewise.
(dtrace_dof_encoding): Likewise.
(DTRACE_DOF_ENCODE_LSB): Likewise.
(DTRACE_DOF_ENCODE_MSB): Likewise.
(dtrace_dof_hdr): New struct.
(dtrace_dof_sect): Likewise.
(dtrace_dof_provider): Likewise.
(dtrace_dof_probe): Likewise.
(DOF_UINT): New macro.
(DTRACE_DOF_PTR): Likewise.
(DTRACE_DOF_SECT): Likewise.
(dtrace_process_dof_probe): New function.
(dtrace_process_dof): Likewise.
(dtrace_build_arg_exprs): Likewise.
(dtrace_get_arg): Likewise.
(dtrace_get_probes): Likewise.
(dtrace_get_probe_argument_count): Likewise.
(dtrace_can_evaluate_probe_arguments): Likewise.
(dtrace_evaluate_probe_argument): Likewise.
(dtrace_compile_to_ax): Likewise.
(dtrace_probe_destroy): Likewise.
(dtrace_gen_info_probes_table_header): Likewise.
(dtrace_gen_info_probes_table_values): Likewise.
(dtrace_probe_is_enabled): Likewise.
(dtrace_probe_ops): New variable.
(info_probes_dtrace_command): New function.
(_initialize_dtrace_probe): Likewise.
(dtrace_type_name): Likewise.
|
|
When GDB is configured with "--without-tui --with-curses" or "--with-tui",
$prefer_curses is set to yes. But, that still doesn't mean that curses
will be used. configure will still search for the curses library, and
continue building without it. That's done here:
curses_found=no
if test x"$prefer_curses" = xyes; then
...
AC_SEARCH_LIBS(waddstr, [ncurses cursesX curses])
if test "$ac_cv_search_waddstr" != no; then
curses_found=yes
fi
fi
So if waddstr is not found, meaning curses is not really
available, even though it'd be preferred, $prefer_curses is
'yes', but $curses_found is 'no'.
So the right fix to tell whether we're linking with curses is
$curses_found=yes.
gdb/ChangeLog:
2015-01-22 Pedro Alves <palves@redhat.com>
* configure.ac [*mingw32*]: Check $curses_found instead of
$prefer_curses.
* configure: Regenerate.
* windows-termcap.c: Remove HAVE_CURSES_H, HAVE_NCURSES_H and
HAVE_NCURSES_NCURSES_H checks.
|
|
gdb/
2015-01-17 Eli Zaretskii <eliz@gnu.org>
* configure.ac [*mingw32*]: Only add windows-termcap.o to
CONFIG_OBS if not building with a curses library.
* configure: Regenerate.
* windows-termcap.c: Include defs.h. Make the whole body empty if
either one of HAVE_CURSES_H or HAVE_NCURSES_H or
HAVE_NCURSES_NCURSES_H is defined.
|
|
This patch moves safe_strerror from the gdb/{posix,mingw}-hdep.c files
to the respective common/{posix,mingw}-strerror.c files. This is a
preparation for the next patch, which shares a common code (to disable
address space randomization when creating a new inferior).
The patch has been regtested on Fedora 20 x86_64, and no regressions
were found.
gdb/ChangeLog
2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in (ALLDEPFILES): Including common/mingw-strerror.c and
common/posix-strerror.c.
(posix-strerror.o): New rule.
(mingw-strerror.o): Likewise.
* common/common-utils.h (safe_strerror): Move prototype to here,
from utils.h.
* common/common.host: New file.
* common/mingw-strerror.c: Likewise.
* common/posix-strerror.c: Likewise.
* configure: Regenerated.
* configure.ac: Source common/common.host. Add variable
common_host_obs to gdb_host_obs.
* contrib/ari/gdb_ari.sh: Mention gdb/common/mingw-strerror.c and
gdb/common/posix-strerror.c when warning about the use of
strerror.
* mingw-hdep.c (safe_strerror): Remove definition; move it to
common/mingw-strerror.c.
* posix-hdep.c (safe_strerror): Remove definition; move it to
common/posix-hdep.c.
* utils.h (safe_strerror): Remove prototype; move to
common/common-utils.h.
gdb/gdbserver/ChangeLog
2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
* Makefile.in (posix-strerror.o): New rule.
(mingw-strerror.o): Likewise.
* configure: Regenerated.
* configure.ac: Source file ../common/common.host. Initialize new
variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
|
|
This patch is to teach both GDB and GDBServer to detect 64-bit inferior
correctly. We find a problem that GDBServer is unable to detect on a
e5500 core processor. Current GDBServer assumes that MSR is a 64-bit
register, but MSR is a 32-bit register in Book III-E. This patch is
to fix this problem by checking the right bit in MSR, in order to handle
both Book III-S and Book III-E. In order to detect Book III-S and
Book III-E, we check the PPC_FEATURE_BOOKE from the host's HWCAP (by
getauxval on glibc >= 2.16. If getauxval doesn't exist, we implement
the fallback by parsing /proc/self/auxv), because it should an invariant
on the same machine cross different processes.
In order to share code, I add nat/ppc-linux.c for both GDB and
GDBserver side.
gdb:
2015-01-14 Yao Qi <yao@codesourcery.com>
* Makefile.in (ppc-linux.o): New rule.
* config/powerpc/ppc64-linux.mh (NATDEPFILES): Add ppc-linux.o.
* configure.ac: AC_CHECK_FUNCS(getauxval).
* config.in: Re-generated.
* configure: Re-generated.
* nat/ppc-linux.h [__powerpc64__] (ppc64_64bit_inferior_p):
Declare.
* nat/ppc-linux.c: New file.
* ppc-linux-nat.c (ppc_linux_target_wordsize) [__powerpc64__]:
Call ppc64_64bit_inferior_p.
gdb/gdbserver:
2015-01-14 Yao Qi <yao@codesourcery.com>
* Makefile.in (SFILES): Add nat/ppc-linux.c.
(ppc-linux.o): New rule.
* configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
* configure.ac: AC_CHECK_FUNCS(getauxval).
* config.in: Re-generated.
* configure: Re-generated.
* linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
ppc64_64bit_inferior_p
|
|
On Sun, 14 Dec 2014 07:00:28 +0100, Yao Qi wrote:
The build on mingw host is broken because mingw has no mkdtemp.
../../../git/gdb/compile/compile.c: In function 'get_compile_file_tempdir':
../../../git/gdb/compile/compile.c:194:3: error: implicit declaration of function 'mkdtemp' [-Werror=implicit-function-declaration]
tempdir_name = mkdtemp (tname);
^
../../../git/gdb/compile/compile.c:194:16: error: assignment makes pointer from integer without a cast [-Werror]
tempdir_name = mkdtemp (tname);
^
cc1: all warnings being treated as errors
In the end I have managed to test it by Wine myself:
$ wine build_win32/gdb/gdb.exe -q build_win32/gdb/gdb.exe -ex start -ex 'compile code 1' -ex 'set confirm no' -ex quit
[...]
Temporary breakpoint 1, main (argc=1, argv=0x241418) at ../../gdb/gdb.c:29
29 args.argc = argc;
Could not load libcc1.so: Module not found.
Even if it managed to load libcc1.so (it needs host-dependent name libcc1.dll)
then it would soon end up at least on:
default_infcall_mmap:
error (_("This target does not support inferior memory allocation by mmap."));
As currently there is only:
linux-tdep.c:
set_gdbarch_infcall_mmap (gdbarch, linux_infcall_mmap);
While one could debug Linux targets from MS-Windows host I find it somehow
overcomplicated now when we are trying to get it running at least on native
Linux x86*.
The 'compile' project needs a larger port effort to run on MS-Windows.
gdb/ChangeLog
2014-12-17 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix MinGW compilation.
* compile/compile.c (get_compile_file_tempdir): Call error if
!HAVE_MKDTEMP.
* config.in: Regenerate.
* configure: Regenerate.
* configure.ac (AC_CHECK_FUNCS): Add mkdtemp.
gdb/testsuite/ChangeLog
2014-12-17 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix MinGW compilation.
* gdb.compile/compile-ops.exp: Update untested message if
!skip_compile_feature_tests.
* gdb.compile/compile-setjmp.exp: Likewise.
* gdb.compile/compile-tls.exp: Likewise.
* gdb.compile/compile.exp: Likewise.
* lib/gdb.exp (skip_compile_feature_tests): Check also "Command not
supported on this host".
|
|
This patch mostly aims at fixing a GDB build failure on 32bit Solaris
systems (Sparc and x86), due to a recent gnulib update adding the
readlink module. But it might also fix related issues when configuring
with --disable-largefile.
A side-effect of the gnulib readlink module addition is that it caused
largefile support to be added as well, and in particular
gnulib/import/m4/largefile.m4 introduced the following new #define in
gnulib's config.in:
| +/* Number of bits in a file offset, on hosts where this is settable. */
| +#undef _FILE_OFFSET_BITS
When defined to 64, it triggers an issue with procfs.h while trying
to build sparc-sol2-nat.c:
| #if !defined(_LP64) && _FILE_OFFSET_BITS == 64
| #error "Cannot use procfs in the large file compilation environment"
| #endif
As it turns out, this is a fairly familiar problem, and one of
the reasons behind ACX_LARGEFILE having been created. In that macro,
we have some code which disables largefile support on solaris hosts:
| sparc-*-solaris*|i[3-7]86-*-solaris*)
| changequote([,])dnl
| # On native 32bit sparc and ia32 solaris, large-file and procfs support
| # are mutually exclusive; and without procfs support, the bfd/ elf module
| # cannot provide certain routines such as elfcore_write_prpsinfo
| # or elfcore_write_prstatus. So unless the user explicitly requested
| # large-file support through the --enable-largefile switch, disable
| # large-file support in favor of procfs support.
| test "${target}" = "${host}" -a "x$plugins" = xno \
| && : ${enable_largefile="no"}
| ;;
But gnulib ignores this fact, and so tries to determine how to
enable large-file support irrespective of whether we want it or not.
This patch fixes the issue by passing --disable-largefile to gnulib's
configure when large-file support in GDB is disabled. This is done
by first enhancing ACX_CONFIGURE_DIR to allow us to pass extra
arguments to be passed to the configure command, and then by modifying
GDB's configure to pass --disable-largefile if large-file support
is disabled.
gdb/ChangeLog:
* acx_configure_dir.m4 (ACX_CONFIGURE_DIR): Add support for
new "EXTRA-ARGS" parameter.
* configure.ac: If large-file support is disabled in GDB,
pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
* configure: Regenerate.
gdb/gdbserver/ChangeLog:
* configure.ac: If large-file support is disabled in GDBserver,
pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
* configure: Regenerate.
Tested by rebuilding on sparc-solaris and x86_64-linux (with gdbserver).
This fixes the build failure on sparc-solaris. I also verified in
gnulib's config.log file that we pass --disable-largefile in the solaris
case, while we do not in the GNU/Linux case.
|
|
gdb:
2014-11-28 Yao Qi <yao@codesourcery.com>
* configure.ac (AC_CHECK_FUNCS): Remove canonicalize_file_name
and realpath.
* config.in: Re-generated.
* configure: Re-generated.
* utils.c (gdb_realpath): Remove code calling realpath,
canonicalize_file_name and pathconf.
[!_WIN32]: Call canonicalize_file_name.
|
|
Since lstat gnulib module is imported, we can use it unconditionally.
lstat usage was introduced by this patch
https://sourceware.org/ml/gdb-patches/2012-01/msg00390.html
during the review, it was suggested to import gnulib lstat module, but
we didn't do that.
gdb:
2014-11-28 Yao Qi <yao@codesourcery.com>
* configure.ac (AC_CHECK_FUNCS): Remove lstat.
* config.in, configure: Regenerate.
* symfile.c (find_separate_debug_file_by_debuglink): Remove
code checking HAVE_LSTAT is defined.
|
|
Since readlink module is imported, we can use it unconditionally.
This patch is to remove configure checks and HAVE_READLINK checks in
code. It was mentioned in the patch below
[RFA/commit] gdbserver: return ENOSYS if readlink not supported.
https://sourceware.org/ml/gdb-patches/2012-02/msg00148.html
to use readlink in gdbserver, but we chose something simple at that
moment.
gdb:
2014-11-28 Yao Qi <yao@codesourcery.com>
* configure.ac (AC_CHECK_FUNCS): Remove readlink.
* config.in, configure: Re-generate.
* inf-child.c (inf_child_fileio_readlink): Don't check
HAVE_READLINK is defined.
gdb/gdbserver:
2014-11-28 Yao Qi <yao@codesourcery.com>
* configure.ac(AC_CHECK_FUNCS): Remove readlink.
* config.in, configure: Re-generate.
* hostio.c (handle_unlink): Remove code checking HAVE_READLINK
is defined.
|
|
Since gnulib alloca module was imported, we can include alloca.h in
both gdb and gdbserver unconditionally, so this patch adds inclusion
of alloca.h in common-defs.h. This patch also removes AC_FUNC_ALLOCA
in configure.ac because we don't need to check alloca any more.
This patch below is removed in fact.
[RFA/commit] include alloca.h if available.
https://www.sourceware.org/ml/gdb-patches/2010-08/msg00566.html
Since alloca.h is from gnulib now, we don't have to check malloc.h in
configure and include malloc.h in code. This patch also remove them
too.
gdb:
2014-11-21 Yao Qi <yao@codesourcery.com>
* common/common-defs.h: Include alloca.h
* configure.ac: Don't invoke AC_FUNC_ALLOCA.
* configure: Re-generated.
* defs.h: Remove code handling alloca.
* utils.c (gdb_realpath): Don't check HAVE_ALLOCA is defined
or not.
gdb/gdbserver:
2014-11-21 Yao Qi <yao@codesourcery.com>
* configure.ac: Don't invoke AC_FUNC_ALLOCA.
(AC_CHECK_HEADERS): Remove malloc.h.
* configure: Re-generated.
* config.in: Re-generated.
* server.h: Don't include alloca.h and malloc.h.
* gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
Don't include malloc.h.
|
|
This commit does most of the mechanical removal. IOW, the easy part.
procfs.c isn't touched beyond removing a couple obvious bits that are
guarded by a couple macros defined in config/alpha/nm-osf3.h. Going
beyond that for procfs.c & co would be a harder excision that
potentially affects Solaris.
Some comments in the generic alpha code ABIs that may still be
relevant and I wouldn't know what to do with them. That can always be
done on a separate pass, preferably by someone who can test on alpha.
A couple other spots have references to OSF/Tru64 and related files
being removed, but it felt like removing them would make things worse,
not better. We can revisit those when we next need to touch that
code.
I didn't remove a reference to osf in testsuite/lib/future.exp, as I
believe that code is imported from DejaGNU.
Built and tested on x86_64 Fedora 20, with --enable-targets=all.
Tested that building for --target=alpha-osf3 on x86_64 Fedora 20
fails with:
checking for default auto-load directory... $debugdir:$datadir/auto-load
checking for default auto-load safe-path... $debugdir:$datadir/auto-load
*** Configuration alpha-unknown-osf3 is obsolete.
*** Support has been REMOVED.
make[1]: *** [configure-gdb] Error 1
make[1]: Leaving directory `build-osf'
make: *** [all] Error 2
gdb/
2014-10-17 Pedro Alves <palves@redhat.com>
* Makefile.in (ALL_64_TARGET_OBS): Remove alpha-osf1-tdep.o.
(HFILES_NO_SRCDIR): Remove config/alpha/nm-osf3.h.
(ALLDEPFILES): Remove alpha-nat.c, alpha-osf1-tdep.c and
solib-osf.c.
* NEWS: Mention that support for alpha*-*-osf* has been removed.
* ada-lang.h [__alpha__ && __osf__]
(ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS): Delete.
* alpha-nat.c, alpha-osf1-tdep.c: Delete files.
* alpha-tdep.c (alpha_gdbarch_init): Remove reference to
GDB_OSABI_OSF1.
* config/alpha/alpha-osf3.mh, config/alpha/nm-osf3.h: Delete
files.
* config/djgpp/fnchange.lst (config/alpha/alpha-osf1.mh)
(config/alpha/alpha-osf2.mh, config/alpha/alpha-osf3.mh): Delete.
* configure: Regenerate.
* configure.ac: Remove references to osf.
* configure.host: Handle alpha*-*-osf* in the obsolete hosts
section. Remove all other references to osf.
* configure.tgt: Add alpha*-*-osf* to the obsolete targets section.
Remove all other references to osf.
* dec-thread.c: Delete file.
* defs.h (GDB_OSABI_OSF1): Delete.
* inferior.h (START_INFERIOR_TRAPS_EXPECTED): New unconditionally
defined.
* osabi.c (gdb_osabi_names): Delete "OSF/1".
* procfs.c (procfs_debug_inferior) [PROCFS_DONT_TRACE_FAULTS]:
Delete code.
(unconditionally_kill_inferior)
[PROCFS_NEED_CLEAR_CURSIG_FOR_KILL]: Delete code.
* solib-osf.c: Delete file.
gdb/testsuite/
2014-10-17 Pedro Alves <palves@redhat.com>
* gdb.base/callfuncs.exp: emove references to osf.
* gdb.base/sigall.exp: Likewise.
* gdb.gdb/selftest.exp: Likewise.
* gdb.hp/gdb.base-hp/callfwmall.exp: Likewise.
* gdb.mi/non-stop.c: Likewise.
* gdb.mi/pthreads.c: Likewise.
* gdb.reverse/sigall-precsave.exp: Likewise.
* gdb.reverse/sigall-reverse.exp: Likewise.
* gdb.threads/pthreads.c: Likewise.
* gdb.threads/pthreads.exp: Likewise.
gdb/doc/
2014-10-17 Pedro Alves <palves@redhat.com>
* gdb.texinfo (Ada Tasks and Core Files): Delete mention of Tru64.
(SVR4 Process Information): Delete mention of OSF/1.
|
|
This does most of the mechanical removal. IOW, the easy part.
This doesn't touch procfs.c as that'd be a harder excision,
potentially affecting Solaris.
mips-tdep.c is left alone. E.g., I didn't delete the GDB_OSABI_IRIX
enum value, nor references to it in mips-tdep.c. Some comments
mentioning IRIX ABIs may still be relevant and I wouldn't know what to
do with them. in That can always be done on a separate pass,
preferably by someone who can test on MIPS.
I didn't remove a reference to IRIX in testsuite/lib/future.exp, as I
believe that code is imported from DejaGNU.
Built and tested on x86_64 Fedora 20, with --enable-targets=all.
Tested that building for --target=mips-sgi-irix6 on x86_64 Fedora 20
fails with:
checking for default auto-load directory... $debugdir:$datadir/auto-load
checking for default auto-load safe-path... $debugdir:$datadir/auto-load
*** Configuration mips-sgi-irix6 is obsolete.
*** Support has been REMOVED.
make[1]: *** [configure-gdb] Error 1
make[1]: Leaving directory `/home/pedro/gdb/mygit/build-irix'
make: *** [all] Error 2
gdb/
2014-10-10 Pedro Alves <palves@redhat.com>
* Makefile.in (ALL_TARGET_OBS): Remove mips-irix-tdep.o and solib-irix.o.
(ALLDEPFILES): Remove mips-irix-tdep.c and solib-irix.c.
(HFILES_NO_SRCDIR): Remove solib-irix.h.
* NEWS: Mention that support for mips-sgi-irix5* mips-sgi-irix6*
and been removed.
* config/mips/irix5.mh, config/mips/irix6.mh: Delete files.
* configure.ac: Remove references to IRIX.
* configure.host: Add *-*-irix* to the obsolete hosts section.
Remove all other references to irix.
* irix5-nat.c, mips-irix-tdep.c, solib-irix.c, solib-irix.h:
Delete files.
gdb/testsuite/
2014-10-10 Pedro Alves <palves@redhat.com>
* gdb.base/bigcore.exp: Remove references to IRIX.
* gdb.base/funcargs.exp: Likewise.
* gdb.base/interrupt.exp: Likewise.
* gdb.base/mips_pro.exp: Likewise.
* gdb.base/nodebug.exp: Likewise.
* gdb.base/setvar.exp: Likewise.
* lib/gdb.exp (gdb_compile_shlib): Remove mips-sgi-irix* case.
|
|
gdb/ChangeLog:
* acinclude.m4 (GDB_GUILE_PROGRAM_NAMES): Pass guile version as
last parameter to pkg-config, not first.
* configure.ac: Pass --with-guile provided pkg-config path to
GDB_GUILE_PROGRAM_NAMES.
* configure: Regenerate.
|
|
The problem here is that if a thread other than gdb's main thread
gets a SIGCHLD (it's an asynchronous signal so the kernel will
essentially pick a random thread) then gdb will hang if it is
in sigsuspend when the SIGCHLD is delivered. The other thread
will see the signal and the sigsuspend won't "wake up".
Guile and libgc should be blocking SIGCHLD in their threads,
but we need to work with Guile 2.0 and libgc 7.4.
The problem first shows up in libgc 7.4 because it is the first
release that enables multiple marker threads by default.
gdb/ChangeLog:
PR 17247
* guile.c: #include <signal.h>.
(_initialize_guile): Block SIGCHLD while initializing Guile.
Replaces the following, which is reverted.
2014-07-26 Doug Evans <xdje42@gmail.com>
PR 17185
* configure.ac: Add check for header gc/gc.h.
Add check for function setenv.
* configure: Regenerate.
* config.in: Regenerate.
* guile/guile.c (_initialize_guile): Add workaround for libgc 7.4.0.
|
|
This commit creates a new file, common/gdb_setjmp.h, to hold some
portability macros for setjmp/longjmp et al. that are used by the
exceptions subsystem and by the demangler crash catcher.
gdb/ChangeLog:
* common/gdb_setjmp.h: New file.
* Makefile.in (HFILES_NO_SRCDIR): Add common/gdb_setjmp.h.
* configure.ac: Move sigsetjmp check...
* common/common.m4: ...here.
* configure: Regenerate.
* cp-support.c (SIGJMP_BUF): Delete.
(SIGSETJMP): Likewise.
(SIGLONGJMP): Likewise.
* exceptions.h (gdb_setjmp.h): Include.
(setjmp.h): Do not include.
(EXCEPTIONS_SIGJMP_BUF): Delete.
(EXCEPTIONS_SIGSETJMP): Likewise.
(EXCEPTIONS_SIGLONGJMP): Likewise.
Replace all uses of EXCEPTIONS_SIG* macros with SIG* macros
from gdb_setjmp.h.
* exceptions.c: Likewise.
gdb/gdbserver/ChangeLog:
* config.in: Regenerate.
* configure: Likewise.
|
|
Directories that don't use libtool need to add -ldl (on most *nix
hosts) to provide dlopen for libbfd.
config/
* plugins.m4 (AC_PLUGINS): If plugins are enabled, add -ldl to
LIBS via AC_SEARCH_LIBS.
gdb/
* acinclude.m4 (GDB_AC_CHECK_BFD): Don't add -ldl.
* config.in: Regenerate.
sim/ppc/
* configure.ac: Invoke AC_PLUGINS.
* config.in: Regenerate.
and regen lots of configure files.
|
|
This patch is to fix the build error when GDB is configured as:
CFLAGS=-Wall ./configure --with-babeltrace; make
This patch adds one line of code in configure test to use local
variable 'pos'.
Note that we append -Werror to CFLAGS to catch the warning related to
assignment to scope. See more in this thread
https://sourceware.org/ml/gdb-patches/2014-08/msg00045.html
2014-08-13 Yao Qi <yao@codesourcery.com>
PR build/17104
* configure.ac: Use local variable 'pos'.
* configure: Regenerated.
|
|
* acinclude.m4 (GDB_GUILE_PROGRAM_NAMES): New macro.
(GDB_GUILD_TARGET_FLAG, GDB_TRY_GUILD): New macros.
* configure.ac: Try to use guild to compile an scm file, if it fails
then disable guile support.
* configure: Regenerate.
* data-directory/Makefile.in (GUILE_SOURCE_FILES): Renamed from
GUILE_FILE_LIST.
(GUILE_COMPILED_FILES): New variable.
(GUILE_FILES) Update.
(GUILD, GUILD_TARGET_FLAG, GUILD_COMPILE_FLAGS): New variables.
(stamp-guile): Compile scm files.
* guile/guile.c (boot_guile_support): New function.
(standard_throw_args_p): New function.
(print_standard_throw_error, print_throw_error): New functions.
(handle_boot_error): New function.
(initialize_scheme_side): Rewrite to call boot_guile_support.
* guile/lib/gdb/boot.scm: Update %load-compiled-path. Load gdb.go.
* guile/lib/gdb/init.scm (%silence-compiler-warnings%): New function.
|
|
Tested with/without guile,python on amd64-linux.
I'm not sure we still have to deal with shells that can't
handle empty for lists, but I played it safe.
Otherwise this patch would be a lot smaller (though a diff -b
will still show the real changes).
PR build/17105
* configure.ac: Add AM_CONDITIONALs for HAVE_PYTHON, HAVE_GUILE.
* configure: Regenerate.
* data-directory/Makefile.in (PYTHON_FILE_LIST): Renamed from
PYTHON_FILES.
(PYTHON_FILES): New variable.
(GUILE_FILE_LIST): Renamed from GUILE_FILES.
(GUILE_FILES): New variable.
(stamp-python, install-python, uninstall-python): Handle empty
file list.
(stamp-guile, install-guile, uninstall-guile): Ditto.
|
|
PR 17185 describes a problem with using gdb+guile with libgc 7.4.0.
The symptom is a hang in sigsuspend.
[The thread referenced in the PR has the details.]
It's not clear what the right fix is, or even where the bug is yet.
This patch applies the same workaround Guile has applied.
There is no functionality or real performance loss with this,
and Guile has been using it for awhile.
* configure.ac: Add check for header gc/gc.h.
Add check for function setenv.
* configure: Regenerate.
* config.in: Regenerate.
* guile/guile.c (_initialize_guile): Add workaround for libgc 7.4.0.
|
|
This commit wraps calls to the demangler with a segmentation fault
handler. The first time a segmentation fault is caught a core file
is generated and the user is prompted to file a bug and offered the
choice to exit or to continue their GDB session. A maintainence
option is provided to allow the user to disable the crash handler
if required.
gdb/
2014-06-19 Gary Benson <gbenson@redhat.com>
* configure.ac [AC_CHECK_FUNCS] <sigaltstack>: New check.
* configure: Regenerate.
* config.in: Likewise.
* main.c (signal.h): New include.
(setup_alternate_signal_stack): New function.
(captured_main): Call the above.
* cp-support.c (signal.h): New include.
(catch_demangler_crashes): New flag.
(SIGJMP_BUF): New define.
(SIGSETJMP): Likewise.
(SIGLONGJMP): Likewise.
(gdb_demangle_jmp_buf): New static global.
(gdb_demangle_attempt_core_dump): Likewise.
(gdb_demangle_signal_handler): New function.
(gdb_demangle): If catch_demangler_crashes is set, install the
above signal handler before calling bfd_demangle, and restore
the original signal handler afterwards. Display the offending
symbol and call demangler_warning the first time a segmentation
fault is caught.
(_initialize_cp_support): New maint set/show command.
gdb/doc/
2014-06-19 Gary Benson <gbenson@redhat.com>
* gdb.texinfo (Maintenance Commands): Document new
"maint set/show catch-demangler-crashes" option.
|
|
The goal of this patch is to provide an easy way to make
--disable-werror the default when building binutils, or the parts
of binutils that need to get built when building GDB. In development
mode, we want to continue making -Werror the default with GCC.
But, when making releases, I think we want to make it as easy as
possible for regular users to successfully build from sources.
GDB already has this kind of feature to turn -Werror as well as
the use of the libmcheck library. As GDB Release Manager, I take
advantage of it to turn those off after having cut the branch.
I'd like to be able to do the same for the binutils bits. And
perhaps Tristan will want to do the same for his releases too
(not sure, binutils builders might be a little savvier than GDB
builders).
This patch introduces a new file, called development.sh, which
just sets a variable called $development. In our development branches
(Eg. "master"), it's set to true. But setting it to false would allow
us to change the default behavior of various development-related
features to be turned off; in this case, it turns off the use of
-Werror by default (use --enable-werror to turn it back on).
bfd/ChangeLog:
* development.sh: New file.
* warning.m4 (AM_BINUTILS_WARNINGS): Source bfd/development.sh.
Make -Werror the default with GCC only if DEVELOPMENT is true.
* Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add
$(srcdir)/development.sh.
* Makefile.in, configure: Regenerate.
binutils/ChangeLog:
* Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
bfd's development.sh.
* Makefile.in, configure: Regenerate.
gas/ChangeLog:
* Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
bfd's development.sh.
* Makefile.in, configure: Regenerate.
gold/ChangeLog:
* Makefile.am (CONFIG_STATUS_DEPENDENCIES): New.
* Makefile.in, configure: Regenerate.
gprof/ChangeLog:
* Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
bfd's development.sh.
* Makefile.in, configure: Regenerate.
ld/ChangeLog:
* Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
bfd's development.sh.
* Makefile.in, configure: Regenerate.
opcodes/ChangeLog:
* Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
bfd's development.sh.
* Makefile.in, configure: Regenerate.
gdb/ChangeLog:
* development.sh: Delete.
* Makefile.in (config.status): Adjust dependency on development.sh.
* configure.ac: Adjust development.sh source call.
* configure: Regenerate.
gdb/gdbserver/ChangeLog:
* configure.ac: Adjust development.sh source call.
* Makefile.in (config.status): Adjust dependency on development.sh.
* configure: Regenerate.
Tested on x86_64-linux by building two ways: One with DEVELOPMENT
set to true, and one with DEVELOPMENT set to false. In the first
case, I could see the use of -Werror, while it disappeared in
the second case.
|
|
gdb/
2014-06-01 Ludovic Courtès <ludo@gnu.org>
* configure.ac: When Guile is available, check for the
availability of 'scm_new_smob'.
* configure, config.h.in: Regenerate.
* guile/guile-internal.h (scm_new_smob) [!HAVE_SCM_NEW_SMOB]: New
function.
|
|
* configure.ac (try_guile_versions): Allow building with guile 2.2.
* configure: Regenerate.
|