This announces the support for debugging Ada programs using
the Ravenscar Profile, as well as documents the new commands
introduced as part of this effort.
gdb/ChangeLog:
* NEWS: Announce Ravenscar Profile support.
gdb/doc/ChangeLog:
* gdb.texinfo (Ravenscar Profile): New node.
gdb/ChangeLog (Jerome Guitton, Joel Brobecker):
* ravenscar-thread.c, ravenscar-thread.h, ravenscar-sparc-thread.c:
New files.
* configure.tgt (sparc-*-*): Add ravenscar-thread.o and
ravenscar-sparc-thread.o to gdb_target_obs.
This new function is needed by the ravenscar-thread layer.
gdb/ChangeLog:
* ada-tasks.c (iterate_over_live_ada_tasks): New function.
* ada-lang.h (iterate_over_live_ada_tasks): Declare.
(write_psymbols): Add 'psyms_seen' and 'is_static' arguments.
Only emit a given psymbol once.
(struct signatured_type_index_data) <psyms_seen>: New field.
(write_one_signatured_type): Update.
(cleanup_htab): New function.
(write_psymtabs_to_index): Update. Create psyms_seen hash. Bump
version to 3.
(save_gdb_index_command): Update index documentation.
Fix lost siginfo_t for inferior calls.
* infrun.c
(struct inferior_thread_state) <siginfo_gdbarch, siginfo_data>: New.
(save_inferior_thread_state): New variables regcache, gdbarch and
siginfo_data. Initialize SIGINFO_DATA if gdbarch_get_siginfo_type_p.
Move INF_STATE allocation later, pre-clear it. Initialize REGISTERS
using REGCACHE.
(restore_inferior_thread_state): New variables regcache and gdbarch.
Restore SIGINFO_DATA for matching GDBARCH. Restore REGISTERS using
REGCACHE. Free also SIGINFO_DATA.
gdb/testsuite/
Fix lost siginfo_t for inferior calls.
* gdb.base/siginfo-infcall.exp: New file.
* gdb.base/siginfo-infcall.c: New file.
gdb/
* amd64-linux-nat.c (compat_siginfo_from_siginfo)
(siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
si_code is < 0. Check for si_code == SI_TIMER before checking for
si_code < 0.
gdb/gdbserver/
* linux-x86-low.c (compat_siginfo_from_siginfo)
(siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
si_code is < 0. Check for si_code == SI_TIMER before checking for
si_code < 0.
* amd64-linux-nat.c (compat_siginfo_from_siginfo)
(siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
si_code is < 0. Check for si_code == SI_TIMER before checking for
si_code < 0.
gdb/gdbserver/
* linux-x86-low.c (compat_siginfo_from_siginfo)
(siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
si_code is < 0. Check for si_code == SI_TIMER before checking for
si_code < 0.
After thread support over core files was added for GNU/Linux was added,
we started noticing the following type of crash when trying to perform
task switches (this is a bit accademic, since task switching is not
supported when debugging core files - this is what our testcase was
verifying).
(please check out the comment inside ada-tasks.c:task_command for
more details on this topic)
The reason for the crash comes from the fact that the GNU/Linux thread
layer now gets pushed on the target stack, causing the associated
to_get_ada_task_ptid target method to be activated. This routine
makes the assumption that, for all threads, the private area is not
NULL. This is incorrect in the case of core files, as the core layer
creates some threads with no private data.
But, taking a step back, we don't need to try to compute the task ptid,
as we'll never be using it anyways (we only use it for task switching).
So the fix is to avoid the ptid computation altogether when debugging
a core file.
gdb/ChangeLog:
* ada-tasks.c (read_atcb): Do not compute the task ptid when
debugging a core file.
* dwarf2read.c (die_needs_namespace) <DW_TAG_variable>: Add also
DW_TAG_constant.
gdb/testsuite/
* gdb.fortran/module.exp (fully qualified name of DW_TAG_constant):
New test.
* gdb.fortran/module.f90 (mod1) <var_const>: New constant.
The testcase was failing on various 64bit platforms, because the
debugging info said that the target type for a const type is a
4-byte reference. In the asm file, I used a .long directive, but
the size of .long is of course dependent on the platform. This
replaces this .long by a .4byte directive.
gdb/testsuite/ChangeLog:
* gdb.dwarf2/dw2-const.S: Use .4byte to reference the target
type of our const type.
This patch adds a new --enable-gdbserver=yes/no/auto command-line switch
in gdb/configure. The primary purpose is to allow a user to disable the
build & install of gdbserver when not desired. It also allows the user
to request gdbserver in which case the configure script will abort if
automatic building of gdbserver is not supported for that configuration.
The default keeps things as is: We automatically build gdbserver if
building for a native configuration and if gdbserver is supported for
that configuration.
gdb/ChangeLog:
* configure.ac: Add support for --enable-gdbserver.
* configure: Regenerate.
At AdaCore, this is mostly intended for ia64-linux, where we currently
do not want to distribute gdbserver. This will be useful in the context
of I417-033, where we are now using "make install" to determine what
needs to be packaged inside the GNAT Pro package.
PR mi/11407
* mi/mi-cmd-stack.c (list_args_or_locals): Catch exceptions from
read_var_value and common_val_print and print a warning.
2010-09-16 Phil Muldoon <pmuldoon@redhat.com>
Jan Kratochvil <jan.kratochvil@redhat.com>
PR mi/11407
* gdb.mi/dw2-ref-missing-frame-func.c: New File.
* gdb.mi/dw2-ref-missing-frame-main.c New File.
* gdb.mi/dw2-ref-missing-frame.S New File.
* gdb.mi/dw2-ref-missing-frame.exp New File.