Commit Graph

27192 Commits

Author SHA1 Message Date
Doug Evans abc72ce4c6 Workaround for gcc/45682.
* dwarf2read.c (partial_die_info): New fields fixup_called,
	linkage_name.
	(guess_partial_die_structure_name): Renamed from guess_structure_name.
	Move definition next to use.  Use linkage_name to determine if class
	is in a namespace.  All callers updated.
	(fixup_partial_die): Return early if already called.
	Set fixup_called when done.
	(guess_full_die_structure_name): New function.
	(determine_prefix): Call it for class/struct/union dies if c++ and
	.debug_types section is present and parent is DW_TAG_compile_unit.
2010-09-29 16:41:24 +00:00
gdbadmin 06c111d6b1 *** empty log message *** 2010-09-29 00:00:33 +00:00
Joel Brobecker 0ac7be2557 Add a sparc simulator with the sparc bareboard target.
gdb/ChangeLog:

        * configure.tgt (sparc-*-*): Set gdb_sim to ../sim/erc32/libsim.a.
        (sparc-*-rtems*): Delete, now redundant with the sparc-*-* case.
2010-09-28 21:46:09 +00:00
Joel Brobecker 6e1bb179c2 [doco] document support for Ravenscar profile
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.
2010-09-28 21:40:23 +00:00
Joel Brobecker 036b1ba8ec Add support for GNAT Ravenscar run-time library.
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.
2010-09-28 21:39:31 +00:00
Joel Brobecker 474011fbad [Ada] Add ada-tasks.c:iterate_over_live_ada_tasks
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.
2010-09-28 21:39:03 +00:00
gdbadmin 22e603ef76 *** empty log message *** 2010-09-28 00:00:33 +00:00
Pierre Muller 99e24b9065 * amd64-windows-tdep.c (amd64_skip_main_prologue): New function.
(amd64_windows_init_abi): Register amd64_skip_main_prologue as gdbarch
	skip_main_prologue method.
2010-09-27 22:05:40 +00:00
Tom Tromey 987d643c0f * dwarf2read.c (dwarf2_read_index): Only allow version 3.
(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.
2010-09-27 18:42:36 +00:00
Tom Tromey d3aff95935 * bcache.c (expand_hash_table): Use hash_function, not hash. 2010-09-27 17:41:36 +00:00
Tom Tromey 716b65bf40 * gdb_wchar.h: Change minimum libiconv to 0x108. 2010-09-27 17:28:50 +00:00
gdbadmin a7cb5251cf *** empty log message *** 2010-09-27 00:00:33 +00:00
gdbadmin a565971e5e *** empty log message *** 2010-09-26 00:00:33 +00:00
gdbadmin 9ff0e3e1a0 *** empty log message *** 2010-09-25 00:00:33 +00:00
Jan Kratochvil 1736ad1102 gdb/
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.
2010-09-24 18:35:28 +00:00
Tom Tromey 4b5246aacb * dwarf2read.c (dw2_expand_symtabs_matching): Add missing
MAYBE_SWAPs.
	(dw2_map_symbol_names): Likewise.
2010-09-24 16:11:46 +00:00
Sami Wagiaalla 2a7d6a257f Fix find_oload_champ_namespace_loop memory leak.
2010-09-24  Sami Wagiaalla  <swagiaal@redhat.com>

	* valops.c (find_oload_champ_namespace_loop): replace incorrect
	discard_cleanups do_cleanups.
2010-09-24 14:47:53 +00:00
Pedro Alves e6ee044df3 PR gdb/11842
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.
2010-09-24 13:44:01 +00:00
Pedro Alves b53a162374 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.
2010-09-24 13:41:43 +00:00
Pedro Alves 96a8853a47 * objfiles.h (ALL_OBJSECTIONS): Handle breaks in the inner loop. 2010-09-24 11:15:55 +00:00
gdbadmin 04d7301a3e *** empty log message *** 2010-09-24 00:00:33 +00:00
gdbadmin 0b4ed05a91 *** empty log message *** 2010-09-23 00:00:33 +00:00
Joel Brobecker 39383a48f7 [Ada] Do not compute task ptid when debugging core file
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.
2010-09-22 22:50:54 +00:00
Joel Brobecker a176ad9221 Fix order of ChangeLog entries.
(entry added at wrong location by patch).
2010-09-22 20:08:04 +00:00
Joel Brobecker 05692c42a6 preserve columnar alignment.
gdb/testsuite/ChangeLog:

        * gdb.dwarf2/dw2-const.S: Minor (space) reformatting.
2010-09-22 20:06:58 +00:00
Jan Kratochvil d31d2fc374 gdb/
Code cleanup.
	* objfiles.c (allocate_objfile) <objfile->name != NULL>: Remove.
	(free_objfile) <objfile->name != NULL>: Remove the conditional around
	xfree.
	* objfiles.h (struct objfile) <name>: New comment it is never NULL.
	* python/py-auto-load.c (auto_load_new_objfile) <!objfile->name>:
	Remove.
	* python/py-objfile.c (objfpy_get_filename) <obj->objfile->name>
	Remove the conditional.
	* python/py-progspace.c (pspy_get_filename) <objfile->name>: Likewise.
2010-09-22 20:00:53 +00:00
Jan Kratochvil 7f6130ff85 gdb/
* main.c: Include objfiles.h.
	(captured_main): New variable objfile.  Call
	load_auto_scripts_for_objfile for ALL_OBJFILES.
2010-09-22 19:59:15 +00:00
Jan Kratochvil c2b0a2291a gdb/
* 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.
2010-09-22 19:22:44 +00:00
Joel Brobecker e8ae22d197 [testsuite] dw2-const.S: fix type reference size on 64bit platforms.
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.
2010-09-22 19:13:40 +00:00
Joel Brobecker 72929c628e DWARF: Add support for DW_TAG_constant DIEs
gdb/ChangeLog:

        * dwarf2read.c (scan_partial_symbols): Add handling of
        DW_TAG_constant DIEs.
        (add_partial_symbol, load_partial_dies, new_symbol): Likewise.

gdb/testsuite/ChangeLog:

        * gdb.dwarf2/dw2-const.S, gdb.dwarf2/dw2-const.exp: New files.
2010-09-22 16:15:34 +00:00
Joel Brobecker 496c0e1ba7 Allow disabling of gdbserver build (--enable-gdbserver=yes/no/auto).
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.
2010-09-22 16:15:01 +00:00
Tom Tromey e846761004 * gdb.texinfo (Values From Inferior): Mention Value.__init__. 2010-09-22 15:51:43 +00:00
Sami Wagiaalla ec32282347 Fix PR 12028: "GDB crashes on a double free during overload resolution "
2010-09-22  Sami Wagiaalla  <swagiaal@redhat.com>

	PR C++/12028
	* valops.c (find_oload_champ_namespace_loop): removed incorrect
	'old_cleanups' reassignment.

2010-09-22  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdb.cp/pr12028.cc: New.
	* gdb.cp/pr12028.exp: New.
2010-09-22 15:48:59 +00:00
Eli Zaretskii fccd1d1e5f gdb.texinfo (Values From Inferior): Clarify that
value.dynamic_type works only in C++ programs with RTTI.
2010-09-22 09:13:31 +00:00
gdbadmin 5a53e2f2e9 *** empty log message *** 2010-09-22 00:00:33 +00:00
gdbadmin 8bf1e1d2d8 *** empty log message *** 2010-09-21 00:00:33 +00:00
gdbadmin 9d143a21bc *** empty log message *** 2010-09-20 00:00:32 +00:00
gdbadmin 10fa46e388 *** empty log message *** 2010-09-19 00:00:34 +00:00
gdbadmin 6bb4880ace *** empty log message *** 2010-09-18 00:00:03 +00:00
gdbadmin 8f8067050f *** empty log message *** 2010-09-17 00:00:32 +00:00
Jan Kratochvil 1558ab4ce7 gdb/
* charset.c (wchar_iterate) <EILSEQ>: Return any possibly converted
	characters.
2010-09-16 19:20:51 +00:00
Phil Muldoon 875b4ff565 2010-09-16 Phil Muldoon <pmuldoon@redhat.com>
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.
2010-09-16 13:47:55 +00:00
gdbadmin 15ed0ef36b *** empty log message *** 2010-09-16 00:00:33 +00:00
Jan Kratochvil 65dedcb26b gdb/
* MAINTAINERS (GLOBAL MAINTAINERS) <Jan Kratochvil>: Move the entry to
	keep the list in alphabetical order.  Use longer e-mail address.
2010-09-15 22:53:53 +00:00
Tom Tromey 0e780a22f0 * MAINTAINERS (GLOBAL MAINTAINERS): Add Jan Kratochvil. 2010-09-15 22:26:25 +00:00
Tom Tromey 62234ccc1e * charset.c (iconv_open): New define.
(iconv): Likewise.
	(iconv_close): Likewise.
	(phony_iconv_open): Add "phony_" prefix.
	(phony_iconv_close): Likewise.
	(phony_iconv): Likewise.
	* gdb_wchar.h: Check _LIBICONV_VERSION, __STDC_ISO_10646__.
	Change how INTERMEDIATE_ENCODING is defined.
2010-09-15 20:18:47 +00:00
Tom Tromey c1b6b909c5 2010-09-15 Paul Bolle <pebolle@tiscali.nl>
* gdb.texinfo (Character Sets): Correctly reference host-charset
	in example.
2010-09-15 19:31:59 +00:00
Doug Evans 4950bc1c0c * dwarf2read.c (struct die_info): Fix comment. 2010-09-15 18:14:47 +00:00
Alan Modra 349126ea35 PR 4606
* gcore.c (gcore_create_callback): Clear SEC_HAS_CONTENTS rather
	than setting SEC_NEVER_LOAD on sections that need not be copied.
2010-09-15 03:30:30 +00:00
gdbadmin 41dfe9624c *** empty log message *** 2010-09-15 00:00:33 +00:00