Joel Brobecker [Tue, 27 Apr 2010 21:06:28 +0000 (21:06 +0000)]
Fix author list for one of the patches.
I was the committer, not the author.
Joel Brobecker [Tue, 27 Apr 2010 21:02:11 +0000 (21:02 +0000)]
Expand description of solib-svr4.c:solib_svr4_r_map
2010-04-27 Joel Brobecker <brobecker@adacore.com>
* solib-svr4.c (solib_svr4_r_map): Expand function description.
Joel Brobecker [Tue, 27 Apr 2010 21:01:57 +0000 (21:01 +0000)]
Associate .dg files to Ada
The .dg files are files containing the user's code, after the GNAT
expander was applied. The expansion replaces some of the complex
features by simpler pseudo-Ada code and the user can ask to see and
debug that code using the -gnatDG option...
For instance, given the following code where Circle is a tagged type
(aka as a class type in C++):
procedure Foo is
My_Shape : Circle := (X => 1, Y => 2, R => 3);
X : Integer;
begin
X := Position_X (My_Shape);
end Foo;
The expansion results in:
procedure foo is
my_shape : pck__circle := (
_parent => (
_tag => pck__circleP,
x => 1,
y => 2),
r => 3);
x : integer;
begin
x := pck__position_x (my_shape);
return;
end foo;
2010-04-27 Joel Brobecker <brobecker@adacore.com>
* symfile.c (init_filename_language_table): Register .dg files
with language_ada.
Joel Brobecker [Tue, 27 Apr 2010 21:01:45 +0000 (21:01 +0000)]
Document special use of target_type field in Ada structs.
This is a comment that I wrote not too long ago, I believe, as part
of a submission process, and somehow did not get to commit. It explains
how the TYPE_TARGET_TYPE is used by Ada in the case of dynamic records/
unions.
2010-04-24 Joel Brobecker <brobecker@adacore.com>
* gdbtypes.h (struct main_type): Expand comment about target_type
field.
Joel Brobecker [Tue, 27 Apr 2010 21:01:30 +0000 (21:01 +0000)]
Check library name rather than member name when rereading symbols.
On Darwin, we have lots of complaints being emitted when restarting
a program:
(gdb) start
`a-except.o' has disappeared; keeping its symbols.
`unwind-dw2.o' has disappeared; keeping its symbols.
`s-except.o' has disappeared; keeping its symbols.
`s-traceb.o' has disappeared; keeping its symbols.
These object files are part of the GNAT runtime, and were never available.
The warning comes from the fact that we're checking whether the .o files
in the GNAT shared runtime have changed whereas we should be checking
whether the GNAT shared library itself has changed.
This patch implements this. Although it is really only useful on a platform
such as Darwin (debug info stored in .o files), we believe that this is
the right thing to do in general. This change should be a noop for all
the other platforms in any case.
gdb/ChangeLog (from Tristan Gingold & Pedro Alves):
* symfile.c (reread_symbols): Also search for file in libraries.
Update comment.
Tested on x86_64-darwin and x86_64-linux.
Joel Brobecker [Tue, 27 Apr 2010 21:01:14 +0000 (21:01 +0000)]
Add support for x86-lynxos cross debugger (as bareboard x86).
This is a fairly simple patch that we have had for a while. LynxOS has
relatively few features, from a GDB perspective, and we've been using
a bareboard x86 debugger as our LynxOS cross-debugger. So here is a patch
that make x86-lynxos an alias of bareboard x86.
On the other end of things, I'm still working on gdbserver support
for LynxOS - I'm just lacking the time to make significant progress.
But this is in the works (in the meantime, we're using gdbserver from
gdb-6.8 which is derived work from LinuxWorks' patch).
I wasn't sure whether this would be interesting or not for the FSF tree,
but since it's simple and unintrusive, I am suggesting it now... Any
objection? I wasn't sure whether it warranted a NEWS entry either, since
it doesn't really add a new port, just an alias. I suggest the NEWS entry
when I'm finally done with the gdbserver port.
gdb/ChangeLog:
* configure.tgt: Treat x86-lynxos targets as x86 bareboard targets
in terms of configuration.
Jan Kratochvil [Tue, 27 Apr 2010 20:07:01 +0000 (20:07 +0000)]
gdb/
* objfiles.c: Include solist.h.
(free_all_objfiles): New variable so. Check stale solist objfiles.
* symfile.c (symbol_file_clear): Swap the order of free_all_objfiles
and no_shared_libraries.
Kai Tietz [Tue, 27 Apr 2010 17:28:15 +0000 (17:28 +0000)]
2010-04-27 Kai Tietz <kai.tietz@onevision.com>
* dlltool.c (main): Query for bfd's underscoring default for
default target case.
2010-04-27 Kai Tietz <kai.tietz@onevision.com>
* binutils-all/dlltool.exp: Allow test for
arm-wince-pe target.
Kai Tietz [Tue, 27 Apr 2010 17:26:09 +0000 (17:26 +0000)]
2010-04-27 Kai Tietz <kai.tietz@onevision.com>
* pe-x86_64.c (TARGET_UNDERSCORE): Set value dependent
to USE_MINGW64_LEADING_UNDERSCORES.
* pei-x86_64.c (TARGET_UNDERSCORE): Likewise.
* config.bfd: Change underscoring default for x64 mingw
to false.
* coffcode.h (coff_write_relocs): Add check that dereferenced
sym_ptr_ptr isn't NULL.
* config.in (USE_MINGW64_LEADING_UNDERSCORES): New.
* configure: Regenerated.
* configure.in: Add option '--enable-leading-mingw64-underscores'
and define config.in variable USE_MINGW64_LEADING_UNDERSCORES.
Joel Brobecker [Tue, 27 Apr 2010 16:36:02 +0000 (16:36 +0000)]
ARI warning fix.
* python/py-auto-load.c (source_section_scripts): Remove trailing
new-line in i18n string.
H.J. Lu [Tue, 27 Apr 2010 16:05:54 +0000 (16:05 +0000)]
Properly install gold/ld as default cross linker.
gold/
2010-04-27 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.am (install-exec-local): Properly install gold as
default cross linker.
* Makefile.in: Regenerated.
ld/
2010-04-27 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.am (install-exec-local): Properly install ld as
default cross linker.
* Makefile.in: Regenerated.
Nick Clifton [Tue, 27 Apr 2010 14:46:09 +0000 (14:46 +0000)]
PR gprof/11524
* corefile.c (core_create_syms_from): Use correct size of buffer.
Nick Clifton [Tue, 27 Apr 2010 14:42:50 +0000 (14:42 +0000)]
PR binutils/11512
* coffgen.c (coff_find_nearest_line): Incldue the section address
of function name symbols in address comparisons.
Nick Clifton [Tue, 27 Apr 2010 14:28:40 +0000 (14:28 +0000)]
Updated French and Russian translations.
Nick Clifton [Tue, 27 Apr 2010 14:24:37 +0000 (14:24 +0000)]
* configure.ac (--enable-gold): Support both, both/gold and
both/bfd to add gold to configdirs without removing ld.
* configure: Regenerated.
* Makefile.def: Add install-gold dependency to install-ld.
* Makefile.in: Regenerated.
Nick Clifton [Tue, 27 Apr 2010 14:12:32 +0000 (14:12 +0000)]
gold:
* configure.ac (install_as_default): Define and set to false
unless --enable-gold or --enable-gold=both/gold has been
specified.
* configure: Regenerate.
* Makefile.am (install-exec-local): Install the executable as
'ld.gold'. If install_as_default is true then also install it as
'ld'.
* Makefile.in: Regenerated.
ld:
* configure.in (install_as_default): Define and set to true
unless --enable-gold=both/gold has been specified.
* configure: Regenerate.
* Makefile.am (transform): Use ld.bfd as the default name of
the linker.
(install-exec-local): Also install the executable as a binary
named 'ld' if install_as_default is true.
* Makefile.in: Regenerate.
gdbadmin [Tue, 27 Apr 2010 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Tue, 27 Apr 2010 00:00:05 +0000 (00:00 +0000)]
daily update
Doug Evans [Mon, 26 Apr 2010 22:02:33 +0000 (22:02 +0000)]
* server.c (handle_general_set): Make static.
Doug Evans [Mon, 26 Apr 2010 21:45:50 +0000 (21:45 +0000)]
* serial.c (serial_write): Handle serial_debug_p akin to serial_read.
Pierre Muller [Mon, 26 Apr 2010 20:49:28 +0000 (20:49 +0000)]
PR breakpoints/11531.
* gdb.base/gdb11531.c: New file.
* gdb.base/gdb11531.exp: New file.
Tom Tromey [Mon, 26 Apr 2010 18:37:14 +0000 (18:37 +0000)]
gdb
* cli/cli-decode.c (complete_on_cmdlist): Make two passes over the
command list.
gdb/testsuite
* gdb.base/completion.exp: Add tests for completion and deprecated
commands.
DJ Delorie [Mon, 26 Apr 2010 18:04:23 +0000 (18:04 +0000)]
merge from gcc
Doug Evans [Mon, 26 Apr 2010 17:38:07 +0000 (17:38 +0000)]
* remote-utils.c (putpkt_binary_1): Call readchar instead of read.
Print received char after testing for error/eof instead of before.
(input_interrupt): Tweak comment.
Mike Frysinger [Mon, 26 Apr 2010 16:23:24 +0000 (16:23 +0000)]
sim: unify target->subdir handling for default tests
The testsuite subdir has a note about unifying the target->subdir logic,
so do just that. The end goal here is to have `make check` work out of
the box without having to delve into dejagnu internals.
The target-specific logic is split out of the top level configure.ac file
and into a dedicated configure.tgt similar to other subprojects (gdb and
ld and etc...) with the difference that this file has to be included at
the m4 level instead of the shell level. This is necessary only because
autoconf requires AC_CONFIG_SUBDIRS be given a string literal and not a
variable value.
Then the toplevel and the testsuite configure files pull this in, the sim
subdir gets expanded into testsuite/site.exp, and the default sim run code
uses this info to set the sim path to the local compiled run file if it
hasn't already been specified.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Jan Kratochvil [Mon, 26 Apr 2010 15:49:11 +0000 (15:49 +0000)]
gdb/testsuite/
* gdb.pascal/gdb11492.exp (print integer_array, print /d char_array)
(print /x char_array): Escape curly brackets.
Pierre Muller [Mon, 26 Apr 2010 13:58:42 +0000 (13:58 +0000)]
*Fix ChangeLog entry
Pierre Muller [Mon, 26 Apr 2010 13:53:57 +0000 (13:53 +0000)]
Removal of config/i386/nm-i386sol2.h native configuration file.
* config/i386/nm-i386sol2.h: Remove file.
* config/i386/i386sol2.mh: Remove NAT_FILE definition.
* config/i386/sol2-64.mh: Idem.
* config/djgpp/fnchange.lst: Idem.
* Makefile.in (HFILES_NO_SRCDIR): Remove reference to that file.
Pierre Muller [Mon, 26 Apr 2010 12:01:44 +0000 (12:01 +0000)]
PR breakpoints/11531.
* config/i386/nm-i386sol2.h (CANNOT_STEP_HW_WATCHPOINTS): Remove
macro definition and related comment.
* infrun.c (CANNOT_STEP_HW_WATCHPOINTS): Remove macro.
(resume): Remove code and comment related to this macro.
doc ChangeLog entry:
* gdbint.texinfo (CANNOT_STEP_HW_WATCHPOINTS): Remove explanation
of macro deleted from GDB code.
Jan Kratochvil [Mon, 26 Apr 2010 09:30:10 +0000 (09:30 +0000)]
gdb/
* cp-namespace.c (cp_lookup_symbol_in_namespace): Fix alloca size.
Fix whitespace.
gdbadmin [Mon, 26 Apr 2010 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Mon, 26 Apr 2010 00:00:04 +0000 (00:00 +0000)]
daily update
gdbadmin [Sun, 25 Apr 2010 00:00:36 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Sun, 25 Apr 2010 00:00:06 +0000 (00:00 +0000)]
daily update
H.J. Lu [Sat, 24 Apr 2010 17:41:04 +0000 (17:41 +0000)]
Restore "call|jmp [xtrn]" in x86 assembler.
gas/
2010-04-24 H.J. Lu <hongjiu.lu@intel.com>
PR gas/11535
* config/tc-i386-intel.c (intel_state): Add is_indirect.
(i386_intel_operand): Initialize intel_state.is_indirect. Check
intel_state.is_indirect for "call|jmp [symbol]".
gas/testsuite/
2010-04-24 H.J. Lu <hongjiu.lu@intel.com>
PR gas/11535
* gas/i386/intelok.s: Add tests for "call|jmp [xtrn]".
* gas/i386/intelok.d: Updated.
Ian Lance Taylor [Sat, 24 Apr 2010 14:32:23 +0000 (14:32 +0000)]
* layout.cc (Layout::layout_reloc): In relocatable link don't
combine reloc sections for grouped sections.
Pedro Alves [Sat, 24 Apr 2010 13:12:56 +0000 (13:12 +0000)]
* defs.h: Adjust comment.
* filesystem.h, filesystem.c: New files.
* Makefile.in (SFILES): Add filesystem.c.
(COMMON_OBS): Add filesystem.o.
* solib.c (solib_find): Handle DOS-based filesystems. Handle
different target and host path flavours.
* arm-symbian-tdep.c (arm_symbian_init_abi): Set
has_dos_based_file_system on the gdbarch.
* arm-wince-tdep.c (arm_wince_init_abi): Ditto.
* i386-cygwin-tdep.c (i386_cygwin_init_abi): Ditto.
* i386-tdep.c (i386_go32_init_abi): Ditto.
* gdbarch.sh (has_dos_based_file_system): New.
* gdbarch.h, gdbarch.c: Regenerate.
* NEWS: Mention improved support for remote targets with DOS-based
filesystems. Mention new `set/show target-file-system-kind'
commands.
gdb/doc/
* gdb.texinfo (Commands to specify files): Describe what how GDB
looks up DOS-based filesystem paths on the system root. Document
the new `set/show target-file-system-kind' commands.
Alan Modra [Sat, 24 Apr 2010 01:05:25 +0000 (01:05 +0000)]
include/elf/
* internal.h (ELF_SECTION_SIZE): Protect macro args with parentheses.
Invert logic to clarify test for .tbss.
(ELF_IS_SECTION_IN_SEGMENT): Rename to..
(ELF_SECTION_IN_SEGMENT_1): ..this. Add check_vma param. Protect
macro args with parentheses.
(ELF_SECTION_IN_SEGMENT): Define.
(ELF_IS_SECTION_IN_SEGMENT_FILE): Delete.
(ELF_IS_SECTION_IN_SEGMENT_MEMORY): Delete.
bfd/
* elf.c: Replace use of ELF_IS_SECTION_IN_SEGMENT and
ELF_IS_SECTION_IN_SEGMENT_FILE with ELF_SECTION_IN_SEGMENT
throughout file.
(assign_file_positions_for_load_sections): Modify section in
segment warning to ignore overlay vmas.
* elf32-spu.c (spu_elf_object_p): Replace use of
ELF_IS_SECTION_IN_SEGMENT_MEMORY with ELF_SECTION_IN_SEGMENT.
binutils/
* readelf.c (process_program_headers): Replace use of
ELF_IS_SECTION_IN_SEGMENT_MEMORY with ELF_SECTION_IN_SEGMENT.
DJ Delorie [Sat, 24 Apr 2010 01:03:21 +0000 (01:03 +0000)]
merge from gcc
Doug Evans [Sat, 24 Apr 2010 00:58:43 +0000 (00:58 +0000)]
* server.c (start_inferior): Print inferior argv if --debug.
Alan Modra [Sat, 24 Apr 2010 00:00:07 +0000 (00:00 +0000)]
daily update
gdbadmin [Sat, 24 Apr 2010 00:00:05 +0000 (00:00 +0000)]
*** empty log message ***
Stan Shebs [Fri, 23 Apr 2010 23:51:05 +0000 (23:51 +0000)]
2010-04-23 Stan Shebs <stan@codesourcery.com>
* ax.h (struct agent_expr): Merge in agent_reqs fields, add some
comments.
(struct agent_reqs): Remove.
(ax_reg_mask): Declare.
* ax-general.c (new_agent_expr): Add gdbarch argument, set new fields.
(free_agent_expr): Free reg_mask.
(ax_print): Add scope and register mask info.
(ax_reqs): Remove agent_reqs argument, use agent expression
fields, and move part of register mask computation to...
(ax_reg_mask): New function.
* ax-gdb.c (gen_trace_static_fields): Call it.
(gen_traced_pop): Ditto.
(is_nontrivial_conversion): Add dummy gdbarch to new_agent_expr.
(gen_trace_for_var): Pass gdbarch to new_agent_expr.
(gen_trace_for_expr): Ditto, and clear optimized_out flag.
(gen_eval_for_expr): Ditto, and require an rvalue.
(agent_command): Call ax_reqs.
(agent_eval_command): Ditto.
* tracepoint.c (report_agent_reqs_errors): Use agent expression fields.
(validate_action_line): Ditto.
(collect_symbol): Ditto.
(encode_actions_1): Ditto.
Jan Kratochvil [Fri, 23 Apr 2010 21:44:20 +0000 (21:44 +0000)]
gdb/
Fix deadlock on looped list of loaded shared objects.
* solib-svr4.c (LM_PREV): New function.
(IGNORE_FIRST_LINK_MAP_ENTRY): Use it.
(svr4_current_sos): Check for correct l_prev. New variables prev_lm
and next_lm. Clear prev_lm for solib_svr4_r_ldsomap.
* config/djgpp/fnchange.lst: Add translation for solib-corrupted.exp.
gdb/testsuite/
Fix deadlock on looped list of loaded shared objects.
* gdb.base/solib-corrupted.exp: New.
Sriraman Tallam [Fri, 23 Apr 2010 18:49:23 +0000 (18:49 +0000)]
2010-04-23 Sriraman Tallam <tmsriram@google.com>
* gc.h (gc_process_relocs): Pass information on relocs pointing to
sections that are not ordinary to icf.
* icf.cc (get_section_contents): Handle relocation pointing to section
with no object or shndx information.
* testsuite/Makefile.am: Remove icf_virtual_function_folding_test.sh
* testsuite/Makefile.in: Regenerate.
* testsuite/icf_virtual_function_folding_test.cc: Remove printf.
* testsuite/icf_virtual_function_folding_test.sh: Delete file.
Doug Evans [Fri, 23 Apr 2010 18:09:16 +0000 (18:09 +0000)]
* configure.ac (CONFIG_SRCS): Add py-auto-load.o even if not using
python.
* configure: Regenerate.
* main.c: #include "python/python.h".
(captured_main): Defer loading auto-loaded scripts until after
local_gdbinit has been sourced.
* python/py-auto-load.c (gdbpy_global_auto_load): New global.
(load_auto_scripts_for_objfile): New function.
(auto_load_new_objfile): Call it.
* python/python.h (gdbpy_global_auto_load): Declare.
(load_auto_scripts_for_objfile): Declare.
Doug Evans [Fri, 23 Apr 2010 18:03:31 +0000 (18:03 +0000)]
Add support for auto-loading scripts from .debug_gdb_scripts section.
* NEWS: Add entry for .debug_gdb_scripts.
* Makefile.in SUBDIR_PYTHON_OBS): Add py-auto-load.o.
(SUBDIR_PYTHON_SRCS): Add py-auto-load.c.
(py-auto-load.o): New rule.
* cli/cli-cmds.c (find_and_open_script): Make externally visible.
* cli/cli-cmds.h (find_and_open_script): Update prototype.
* python/py-auto-load.c: New file.
* python/python-internal.h: #include <stdio.h>.
(set_python_list, show_python_list): Declare.
(gdbpy_initialize_auto_load): Declare.
(source_python_script_for_objfile): Declare.
* python/python.c: Remove #include of observer.h.
(gdbpy_auto_load): Moved to py-auto-load.c.
(GDBPY_AUTO_FILENAME): Ditto.
(gdbpy_new_objfile): Delete.
(source_python_script_for_objfile): New function.
(set_python_list, show_python_list): Make externally visible.
(_initialize_python): Move "auto-load" command to py-auto-load.c
and observer_attach_new_objfile to py-auto-load.c.
doc/
* gdb.texinfo (Python): Move Auto-loading section here ...
(Python API): from here.
(Auto-loading): Add docs for .debug_gdb_scripts auto-loaded scripts.
(Maintenance Commands): Add docs for "maint print section-scripts".
testsuite/
* gdb.python/py-section-script.c: New file.
* gdb.python/py-section-script.exp: New file.
* gdb.python/py-section-script.py: New file.
Doug Evans [Fri, 23 Apr 2010 16:20:13 +0000 (16:20 +0000)]
Add support for auto-loading scripts from .debug_gdb_scripts section.
* NEWS: Add entry for .debug_gdb_scripts.
* Makefile.in SUBDIR_PYTHON_OBS): Add py-auto-load.o.
(SUBDIR_PYTHON_SRCS): Add py-auto-load.c.
(py-auto-load.o): New rule.
* cli/cli-cmds.c (find_and_open_script): Make externally visible.
* cli/cli-cmds.h (find_and_open_script): Update prototype.
* python/py-auto-load.c: New file.
* python/python-internal.h: #include <stdio.h>.
(set_python_list, show_python_list): Declare.
(gdbpy_initialize_auto_load): Declare.
(source_python_script_for_objfile): Declare.
* python/python.c: Remove #include of observer.h.
(gdbpy_auto_load): Moved to py-auto-load.c.
(GDBPY_AUTO_FILENAME): Ditto.
(gdbpy_new_objfile): Delete.
(source_python_script_for_objfile): New function.
(set_python_list, show_python_list): Make externally visible.
(_initialize_python): Move "auto-load" command to py-auto-load.c
and observer_attach_new_objfile to py-auto-load.c.
doc/
* gdb.texinfo (Python): Move Auto-loading section here ...
(Python API): from here.
(Auto-loading): Add docs for .debug_gdb_scripts auto-loaded scripts.
(Maintenance Commands): Add docs for "maint print section-scripts".
testsuite/
* gdb.python/py-section-script.c: New file.
* gdb.python/py-section-script.exp: New file.
* gdb.python/py-section-script.py: New file.
Mike Frysinger [Fri, 23 Apr 2010 15:39:15 +0000 (15:39 +0000)]
sim: fix fpu missing initializer warnings
The current fpu code with externals enabled results in the warnings:
common/sim-fpu.c:2437: warning: missing initializer
common/sim-fpu.c:2437: warning: (near initialization for 'sim_fpu_zero.sign')
common/sim-fpu.c:2440: warning: missing initializer
common/sim-fpu.c:2440: warning: (near initialization for 'sim_fpu_qnan.sign')
So tweak the old style initializers to avoid these.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Jerome Guitton [Fri, 23 Apr 2010 15:14:22 +0000 (15:14 +0000)]
* alpha-tdep.c (INSN_OPCODE, MEM_RA, MEM_RB, MEM_DISP, BR_RA)
(OPR_FUNCTION, OPR_HAS_IMMEDIATE, OPR_RA, OPR_RC, OPR_LIT): New macros.
(lda_opcode, stq_opcode, bne_opcode, subq_opcode, subq_function):
New constants.
(alpha_heuristic_analyze_probing_loop): New function.
(alpha_heuristic_frame_unwind_cache): In the prologue analysis, detect
and handle cases when a stack probe loop is generated.
* alpha-mdebug-tdep.c (alpha_mdebug_frameless): New function.
(alpha_mdebug_max_frame_size_exceeded): New function.
(alpha_mdebug_after_prologue): Use alpha_mdebug_frameless.
(alpha_mdebug_frame_sniffer, alpha_mdebug_frame_base_sniffer):
Return 0 when the maximum debuggable frame size has been exceeded.
Joel Brobecker [Fri, 23 Apr 2010 12:36:05 +0000 (12:36 +0000)]
Fix ARI warning.
* ppc-linux-nat.c (booke_cmp_hw_point): Do not mark inline.
Chris Moller [Fri, 23 Apr 2010 12:08:07 +0000 (12:08 +0000)]
PR 10179
* symtab.c (rbreak_command): Added code to include a filename
specification in the rbreak argument.
* NEWS: Added a brief description of filename-qualified rbreak.
* gdb.base/Makefile.in (EXECUTABLES): Added pr10179.
* gdb.base/pr10179-a.c:
* gdb.base/pr10179-b.c:
* gdb.base/pr10179.exp: New files.
* gdb.texinfo (Setting Breakpoints): Added description of
filename-qualified rbreak.
* refcard.tex (Breakpoints and Watchpoints): Added brief
description of filename-qualified rbreak.
Ian Lance Taylor [Fri, 23 Apr 2010 04:47:33 +0000 (04:47 +0000)]
* expression.cc (Expression::Expression_eval_info): Add
result_alignment_pointer field.
(Expression::eval_with_dot): Add result_alignment_pointer
parameter. Change all callers.
(Expression::eval_maybe_dot): Likewise.
(class Binary_expression): Add alignment_pointer parameter to
left_value and right_value. Change all callers.
(BINARY_EXPRESSION): Set result alignment.
(class Trinary_expression): Add alignment_pointer parameter to
arg2_value and arg3_value. Change all callers.
(Trinary_cond::value): Set result alignment.
(Max_expression::value, Min_expression::value): Likewise.
(Align_expression::value): Likewise.
* script-sections.cc (class Sections_element): Add dot_alignment
parameter to set_section_addresses virtual function. Update
instantiations.
(class Output_section_element): Likewise.
(Script_sections::create_segments): Add dot_alignment parameter.
Change all callers.
(Script_sections::create_segments_from_phdrs_clause): Likewise.
(Script_sections::set_phdrs_clause_addresses): Likewise.
* script-sections.h: Update declarations.
* script.h: Update declarations.
* output.h (Output_segment::set_minimum_p_align): Don't decrease
min_p_align.
* testsuite/script_test_3.t: Set large alignment.
* testsuite/script_test_3.sh: Make sure that at least one LOAD
segment has expected alignment.
gdbadmin [Fri, 23 Apr 2010 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Fri, 23 Apr 2010 00:00:07 +0000 (00:00 +0000)]
daily update
Jan Kratochvil [Thu, 22 Apr 2010 23:15:43 +0000 (23:15 +0000)]
gdb/
Fix crashes on dangling display expressions.
* ada-lang.c (ada_operator_check): New function.
(ada_exp_descriptor): Fill-in the field operator_check.
* c-lang.c (exp_descriptor_c): Fill-in the field operator_check.
* jv-lang.c (exp_descriptor_java): Likewise.
* m2-lang.c (exp_descriptor_modula2): Likewise.
* scm-lang.c (exp_descriptor_scm): Likewise.
* parse.c (exp_descriptor_standard): Likewise.
(operator_check_standard): New function.
(exp_iterate, exp_uses_objfile_iter, exp_uses_objfile): New functions.
* parser-defs.h (struct exp_descriptor): New field operator_check.
(operator_check_standard, exp_uses_objfile): New declarations.
* printcmd.c: Remove the inclusion of solib.h.
(display_uses_solib_p): Remove the function.
(clear_dangling_display_expressions): Call lookup_objfile_from_block
and exp_uses_objfile instead of display_uses_solib_p.
* solist.h (struct so_list) <objfile>: New comment.
* symtab.c (lookup_objfile_from_block): Remove the static qualifier.
* symtab.h (lookup_objfile_from_block): New declaration.
(struct general_symbol_info) <obj_section>: Extend the comment.
gdb/testsuite/
Fix crashes on dangling display expressions.
* gdb.base/solib-display.exp: Call gdb_gnu_strip_debug if LIBSEPDEBUG
is SEP.
(lib_flags): Remove the "debug" keyword.
(libsepdebug): New variable for iterating new loop.
(save_pf_prefix): New variable wrapping the loop.
(sep_lib_flags): New variable derived from LIB_FLAGS. Use it.
* lib/gdb.exp (gdb_gnu_strip_debug): Document the return code.
Pierre Muller [Thu, 22 Apr 2010 22:29:01 +0000 (22:29 +0000)]
* gdb.threads/watchthreads.exp: Change to obtain consistent output.
Thiago Jung Bauermann [Thu, 22 Apr 2010 22:26:36 +0000 (22:26 +0000)]
2010-04-22 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
Thiago Jung Bauermann <bauerman@br.ibm.com>
* ppc-linux-nat.c (PTRACE_GET_DEBUGREG): Update comment.
(PPC_PTRACE_GETWDBGINFO, PPC_PTRACE_SETHWDEBUG, PPC_PTRACE_DELHWDEBUG,
ppc_debug_info, PPC_DEBUG_FEATURE_INSN_BP_RANGE,
PPC_DEBUG_FEATURE_INSN_BP_MASK, PPC_DEBUG_FEATURE_DATA_BP_RANGE,
PPC_DEBUG_FEATURE_DATA_BP_MASK, ppc_hw_breakpoint,
PPC_BREAKPOINT_TRIGGER_EXECUTE, PPC_BREAKPOINT_TRIGGER READ,
PPC_BREAKPOINT_TRIGGER_WRITE, PPC_BREAKPOINT_TRIGGER_RW,
PPC_BREAKPOINT_MODE_EXACT PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE,
PPC_BREAKPOINT_MODE_RANGE_EXCLUSIVE, PPC_BREAKPOINT_MODE_MASK,
PPC_BREAKPOINT_CONDITION_NONE, PPC_BREAKPOINT_CONDITION_AND,
PPC_BREAKPOINT_CONDITION_EXACT, PPC_BREAKPOINT_CONDITION_OR,
PPC_BREAKPOINT_CONDITION_AND_OR, PPC_BREAKPOINT_CONDITION_BE_ALL,
PPC_BREAKPOINT_CONDITION_BE_SHIFT, PPC_BREAKPOINT_CONDITION_BE):
Define, in case <ptrace.h> doesn't provide it.
(booke_debug_info): New variable.
(max_slots_number): Ditto.
(hw_break_tuple): New struct.
(thread_points): Ditto.
(ppc_threads): New variable.
(PPC_DEBUG_CURRENT_VERSION): New define.
(have_ptrace_new_debug_booke): New function.
(ppc_linux_check_watch_resources): Renamed to ...
(ppc_linux_can_use_hw_breakpoint): ... this. Handle BookE processors.
(ppc_linux_region_ok_for_hw_watchpoint): Handle BookE processors.
(booke_cmp_hw_point): New function.
(booke_find_thread_points_by_tid): Ditto.
(booke_insert_point): Ditto.
(booke_remove_point): Ditto.
(ppc_linux_insert_hw_breakpoint): Ditto.
(ppc_linux_remove_hw_breakpoint): Ditto.
(get_trigger_type): Ditto.
(ppc_linux_insert_watchpoint): Handle BookE processors.
(ppc_linux_remove_watchpoint): Ditto.
(ppc_linux_new_thread): Ditto.
(ppc_linux_thread_exit): New function..
(ppc_linux_stopped_data_address): Handle BookE processors.
(ppc_linux_watchpoint_addr_within_range): Ditto.
(_initialize_ppc_linux_nat): Initialize to_insert_hw_breakpoint and
to_remove_hw_breakpoint fields of the target operations struct.
Add observe for the thread_exit event.
H.J. Lu [Thu, 22 Apr 2010 20:42:04 +0000 (20:42 +0000)]
Reformat.
H.J. Lu [Thu, 22 Apr 2010 20:35:28 +0000 (20:35 +0000)]
Remove regmap from i386-linux-nat.c.
2010-04-22 H.J. Lu <hongjiu.lu@intel.com>
* i386-linux-nat.c (regmap): Removed.
(fetch_register): Replace regmap with
i386_linux_gregset_reg_offset.
(store_register): Likewise.
(supply_gregset): Likewise.
(fill_gregset): Likewise.
* i386-linux-tdep.c (i386_linux_gregset_reg_offset): Make it
global.
* i386-linux-tdep.h (i386_linux_gregset_reg_offset): New.
Chris Moller [Thu, 22 Apr 2010 20:12:07 +0000 (20:12 +0000)]
* cp-valprint.c (cp_print_value_fields): Replaced obstack_base()
method of popping recursion-detection stack with a method based on
obstack_object_size(). (Similar to the PR9167 patch below, but for
the static array obstack rather than the static member obstack.)
H.J. Lu [Thu, 22 Apr 2010 20:02:55 +0000 (20:02 +0000)]
Remove amd64_linux_gregset64_reg_offset.
2010-04-22 H.J. Lu <hongjiu.lu@intel.com>
* amd64-linux-nat.c (amd64_linux_gregset64_reg_offset): Removed.
(_initialize_amd64_linux_nat): Replace
amd64_linux_gregset64_reg_offset with
amd64_linux_gregset_reg_offset.
* amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Make it
global.
* amd64-tdep.h (amd64_linux_gregset_reg_offset): New.
Jan Kratochvil [Thu, 22 Apr 2010 16:32:43 +0000 (16:32 +0000)]
gdb/doc/
* gdb.texinfo (Data): New @menu reference to Pretty Printing.
(Python API): Change the reference to Pretty Printing API.
(Pretty Printing): Move the user part under the Data node. Reformat
the sample output to 72 columns. Create a new reference to Pretty
Printing API. Rename the API part ...
(Pretty Printing API): To a new node name.
(Selecting Pretty-Printers, Progspaces In Python, Objfiles In Python)
(GDB/MI Variable Objects): Change references to Pretty Printing API.
Nick Clifton [Thu, 22 Apr 2010 14:37:16 +0000 (14:37 +0000)]
Updated translation templates.
Updated Bulgarian translation.
Updated Finnish translations.
Updated French translations.
Updated Vietnamese translations.
H.J. Lu [Thu, 22 Apr 2010 14:12:42 +0000 (14:12 +0000)]
Add icf_virtual_function_folding_test to check_PROGRAMS.
2010-04-22 H.J. Lu <hongjiu.lu@intel.com>
* testsuite/Makefile.am (check_PROGRAMS): Add
icf_virtual_function_folding_test.
* testsuite/Makefile.in: Regenerated.
Pierre Muller [Thu, 22 Apr 2010 13:37:18 +0000 (13:37 +0000)]
PR stabs/11479.
* gdb.stabs/gdb11479.exp: New file.
* gdb.stabs/gdb11479.c: New file.
Pierre Muller [Thu, 22 Apr 2010 12:34:24 +0000 (12:34 +0000)]
* Remove unwanted space in set_length_in_type_chain parameterdeclaration
Pierre Muller [Thu, 22 Apr 2010 12:30:55 +0000 (12:30 +0000)]
PR stabs/11479.
* stabsread.c (set_length_in_type_chain): New function.
(read_struct_type): Call set_length_in_type_chain function.
(read_enum_type): Idem.
Stan Shebs [Thu, 22 Apr 2010 04:14:15 +0000 (04:14 +0000)]
2010-04-21 Stan Shebs <stan@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
* tracepoint.c (trace_save): Open in binary mode.
Stan Shebs [Thu, 22 Apr 2010 04:09:25 +0000 (04:09 +0000)]
2010-04-21 Stan Shebs <stan@codesourcery.com>
* gdb.texinfo (Tracepoint Actions): Mention synonymy of actions
and commands.
(Listing Tracepoints): Update to reflect current behavior.
H.J. Lu [Thu, 22 Apr 2010 03:10:48 +0000 (03:10 +0000)]
Remove i386_is_register.
2010-04-21 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (i386_is_register): Removed.
(x86_cons): Don't use i386_is_register.
(parse_register): Likewise.
* config/tc-i386-intel.c (i386_intel_simplify): Likewise.
(i386_intel_operand): Likewise.
Mike Frysinger [Thu, 22 Apr 2010 02:18:32 +0000 (02:18 +0000)]
sim: profile: implement --profile-file backend
Need to update the sim_profile_print_bar() call after the common/ changes.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Alan Modra [Thu, 22 Apr 2010 01:51:01 +0000 (01:51 +0000)]
bfd/
* elf.c (assign_file_positions_for_load_sections): Revert 2008-05-29
change. Tidy. Don't error on sections not allocated in segment.
ld/testsuite/
* ld-elf/extract-symbol-1sec.d: Update lma.
* ld-i386/alloc.d: Expect a warning, not an error.
H.J. Lu [Thu, 22 Apr 2010 01:01:34 +0000 (01:01 +0000)]
Don't use i386_is_register in tc_x86_parse_to_dw2regnum.
2010-04-21 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (tc_x86_parse_to_dw2regnum): Don't use
i386_is_register.
H.J. Lu [Thu, 22 Apr 2010 00:43:38 +0000 (00:43 +0000)]
Remove is_intel_syntax from i386_is_register.
2010-04-21 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (i386_is_register): Remove is_intel_syntax.
(x86_cons): Updated.
(parse_register): Likewise.
(tc_x86_parse_to_dw2regnum): Likewise.
* config/tc-i386-intel.c (i386_intel_simplify): Likewise.
(i386_intel_operand): Likewise.
Mike Frysinger [Thu, 22 Apr 2010 00:40:44 +0000 (00:40 +0000)]
sim: profile: implement --profile-file backend
Need to update the sim_profile_print_bar() call after the common/ changes.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Thu, 22 Apr 2010 00:40:14 +0000 (00:40 +0000)]
sim: profile: implement --profile-file backend
The common/ code uses sim_cpu rather than SIM_CPU to avoid inter-header
dependency issues, so follow convention to fix building some targets.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Thu, 22 Apr 2010 00:26:08 +0000 (00:26 +0000)]
sim: profile: implement --profile-file backend
The profile code already has options and handling for accepting a file to
write the profile output like the trace code, but it doesn't actually use
it. At the moment, it simply opens the file at the start and closes it at
the end. So add two new local functions the way the trace code is doing
it and have them figure out whether to write the output to stdout or the
specified file. Then convert all existing output in the profile code to
use these helpers.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
gdbadmin [Thu, 22 Apr 2010 00:00:35 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Thu, 22 Apr 2010 00:00:06 +0000 (00:00 +0000)]
daily update
Pierre Muller [Wed, 21 Apr 2010 23:21:04 +0000 (23:21 +0000)]
gdb ChangeLog
* gdbtypes.h (builtin_type): Add builtin_char16 and builtin_char32
fields.
* gdbtypes.c (gdbtypes_post_init): Set builtin_char16 and
builtin_char32 fields.
* printcmd.c (decode_format): Set char size to '\0'
for strings unless explicit size is given.
(print_formatted): Correct calculation of NEXT_ADDRESS
for 16 or 32 bit strings.
(do_examine): Do not force byte size for strings.
Use builtin_char16 and builtin_char32 types to display
16 or 32 bit-wide strings.
(x_command): Set LAST_SIZE to 'b' for string type.
gdb/doc ChangeLog
* gdb.texinfo (Examining memory): Update for
change in string display with explicit size.
gdb/testsuite ChangeLog
* gdb.base/charset.c (Strin16, String32): New variables.
* gdb.base/charset.exp (gdb_test): Test correct display
of 16 or 32 bit strings.
H.J. Lu [Wed, 21 Apr 2010 20:23:03 +0000 (20:23 +0000)]
Reformat.
H.J. Lu [Wed, 21 Apr 2010 20:22:20 +0000 (20:22 +0000)]
Properly read i386 coredump.
2010-04-21 H.J. Lu <hongjiu.lu@intel.com>
PR corefiles/11523
* amd64-linux-tdep.c (amd64_linux_core_read_description): Check
XCR0 first.
* i386-linux-tdep.c (i386_linux_core_read_xcr0): Return 0 if
there is no .reg-xstate section.
(i386_linux_core_read_description): Check XCR0 first.
Mike Frysinger [Wed, 21 Apr 2010 20:13:41 +0000 (20:13 +0000)]
gdb: workaround sparc memcpy fortify error
Building on an x86_64-linux system with --enable-targets=all fails on the
sparc code with a fortify error:
cc1: warnings being treated as errors
In file included from /usr/include/string.h:640,
from gnulib/string.h:23,
from ../../gdb/gdb_string.h:25,
from ../../gdb/vec.h:25,
from ../../gdb/memattr.h:24,
from ../../gdb/target.h:60,
from ../../gdb/exec.h:23,
from ../../gdb/gdbcore.h:31,
from ../../gdb/sparc-tdep.c:29:
In function 'memcpy',
inlined from 'sparc32_store_return_value' at ../../gdb/sparc-tdep.c:1112,
inlined from 'sparc32_return_value' at ../../gdb/sparc-tdep.c:1170:
/usr/include/bits/string3.h:52: error: call to __builtin___memcpy_chk will
always overflow destination buffer
make: *** [sparc-tdep.o] Error 1
This is due to the gcc optimizer bug PR37060, so tweak the gdb_assert ()
to avoid the issue.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Joseph Myers [Wed, 21 Apr 2010 18:56:45 +0000 (18:56 +0000)]
gas/testsuite:
* gas/tic6x/insns-c674x.s, gas/tic6x/insns-c674x.d: Also test
"b .S2 b3".
include/opcode:
* tic6x-insn-formats.h (s_branch): Correct typo in bitmask.
H.J. Lu [Wed, 21 Apr 2010 18:17:45 +0000 (18:17 +0000)]
Revert the accidental checkin.
H.J. Lu [Wed, 21 Apr 2010 18:09:52 +0000 (18:09 +0000)]
Properly handle ".equ symbol, reg + NUM" in x86 Intel syntax.
gas/
2010-04-21 H.J. Lu <hongjiu.lu@intel.com>
PR gas/11509
* config/tc-i386-intel.c (i386_intel_simplify_register): New.
(i386_intel_simplify): Use i386_is_register and
i386_intel_simplify_register. Set X_md for O_register and
check X_md for O_constant.
(i386_intel_operand): Use i386_is_register.
* config/tc-i386.c (i386_is_register): New.
(x86_cons): Initialize the X_md field. Use i386_is_register.
(parse_register): Use i386_is_register.
(tc_x86_parse_to_dw2regnum): Likewise.
gas/testsuite/
2010-04-21 H.J. Lu <hongjiu.lu@intel.com>
PR gas/11509
* gas/i386/equ.s: Add tests for ".equ symbol, reg + NUM".
* gas/i386/equ.d: Updated.
Chris Moller [Wed, 21 Apr 2010 17:33:54 +0000 (17:33 +0000)]
PR 9167
* cp-valprint.c (cp_print_value_fields): Replaced obstack_base()
method of popping recursion-detection stack with a method based on
obstack_object_size().
* gdb.cp/Makefile.in (EXECUTABLES): Added pr9167.
* gdb.cp/pr9167.cc: New file.
* gdb.cp/pr9167.exp: New file.
H.J. Lu [Wed, 21 Apr 2010 17:10:44 +0000 (17:10 +0000)]
Initialize the X_md field.
2010-04-21 H.J. Lu <hongjiu.lu@intel.com>
* expr.c (expr): Initialize the X_md field.
Andrew Haley [Wed, 21 Apr 2010 16:32:31 +0000 (16:32 +0000)]
2010-04-15 Andrew Haley <aph@redhat.com>
* emultempl/armelf.em (merge_exidx_entries): New variable.
(OPTION_NO_MERGE_EXIDX_ENTRIES): New definition.
("no-merge-exidx-entries"): New option.
* ld.texinfo (merge-exidx-entries): Document this option.
2010-04-15 Andrew Haley <aph@redhat.com>
* bfd-in.h (elf32_arm_fix_exidx_coverage): Add new flag:
merge_exidx_entries.
* bfd-in2.h: Likewise.
* elf32-arm.c (elf32_arm_fix_exidx_coverage): Likewise. Use it to
control merging of exidx entries.
2010-04-15 Andrew Haley <aph@redhat.com>
* options.h (merge_exidx_entries): New option.
* arm.cc (class Arm_exidx_fixup): Add new arg, merge_exidx_entries.
(class Arm_exidx_fixup::merge_exidx_entries_): New member.
(Output_section::fix_exidx_coverage): Add new arg, merge_exidx_entries.
(Target_arm::merge_exidx_entries): New function.
(process_exidx_entry): Don't merge if merge_exidx_entries_ is false.
(Arm_output_section::fix_exidx_coverage): Pass merge_exidx_entries
to Arm_exidx_fixup constructor.
Add new arg, merge_exidx_entries.
(Target_arm::fix_exidx_coverage): pass merge_exidx_entries to
Arm_output_section::fix_exidx_coverage.
Aleksandar Ristovski [Wed, 21 Apr 2010 13:42:56 +0000 (13:42 +0000)]
* Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
* nto-x86-low.c: Include server.h
Pierre Muller [Wed, 21 Apr 2010 09:54:59 +0000 (09:54 +0000)]
gdb ChangeLog
PR pascal/11492.
* p-valprint.c (pascal_val_print): Fix default printing of integer
arrays.
gdb/testsuite ChangeLog
PR pascal/11492.
* gdb.pascal/gdb11492.pas: New file.
* gdb.pascal/gdb11492.exp: New file.
Pierre Muller [Wed, 21 Apr 2010 08:44:51 +0000 (08:44 +0000)]
Fix compilation warning on gcc-4.1.2.
* rs6000-aix-tdep.c (rs6000_convert_from_func_ptr_addr): Initialize
local variable`pc' to zero.
Doug Evans [Wed, 21 Apr 2010 03:27:35 +0000 (03:27 +0000)]
* gdb.base/source-test.gdb: New file.
Remove duplicate entry.
gdbadmin [Wed, 21 Apr 2010 00:00:34 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Wed, 21 Apr 2010 00:00:04 +0000 (00:00 +0000)]
daily update
Joel Brobecker [Tue, 20 Apr 2010 23:14:12 +0000 (23:14 +0000)]
Implement thread support with core files on alpha-tru64
Thread support currently does not work with core files. Note that,
in order to thread support to work on tru64, one need to allow GDB
to write in the core file (this is because the thread debug library
needs to write).
An obvious visible symptom of the problem is that "info threads" does
not list the various threads:
(gdb) info threads
* 1 <main task> 0x000003ff805c0918 in __nxm_thread_kill ()
from /usr/shlib/libpthread.so
One other noticeable consequence is that GDB generates some warnings
when using "info tasks":
(gdb) info tasks
warning: Could not find thread id from THREAD = 0x3ffc01b6000
warning: Could not find thread id from THREAD = 0x20000e2b4c0
ID TID P-ID Pri State Name
* 1
140051000 0 30 Runnable main_task
* 2
14005c000 1 30 Accept or Select Term my_t
(notice also how both tasks are marked as being the active task,
which cannot be true).
The problem is that the dec-thread module has not updated its thread list
after the core file got loaded. In fact, the list only gets resync'ed
at the end of each target-wait. The solution was to implement the
find_new_threads target_ops method.
gdb/ChangeLog:
Implement thread support with core files on alpha-tru64.
* dec-thread.c (dec_thread_find_new_threads): New function,
extracted from resync_thread_list.
(resync_thread_list): Add OPS parameter. Replace extracted-out
code by call to dec_thread_find_new_threads.
(dec_thread_wait): Update call to resync_thread_list.
(init_dec_thread_ops): Set dec_thread_ops.to_find_new_threads.
Joel Brobecker [Tue, 20 Apr 2010 22:51:24 +0000 (22:51 +0000)]
Add missing directory name in last ChangeLog entry.
Joel Brobecker [Tue, 20 Apr 2010 22:40:36 +0000 (22:40 +0000)]
[AVR] inferior call of subprogram with pointer as argument
On AVR, the gdb view of an address is different from the machine view of the
same address. We need to use special machinery implemented by value_pointer
to take the pointer of a value.
For instance, considering the following function...
procedure Trace (Unit : T; Message : String);
... where T is an access Integer (a pointer to an integer), call to this
function currently triggers the following warnings:
(gdb) call debug.trace (me, "You")
warning: Value does not fit in 16 bits.
warning: Value does not fit in 16 bits.
Tracing message: You
It could have been worse if Trace actually tried to dereference the Unit
argument...
gdb/ChangeLog (from Tristan Gingold):
* ada-lang.c (value_pointer): New function.
(make_array_descriptor): Call value_pointer to convert addresses to
pointers.
Tested on avr and x86_64-linux.
Joel Brobecker [Tue, 20 Apr 2010 22:38:54 +0000 (22:38 +0000)]
[AIX] Memory error while checking if pointer is descriptor.
A long time ago (Oct 2009), I noticed a problem on AIX, where something
failed with an error while the debugger was checking whether an address
was a descriptor or not. Unfortunately, like an idiot, I forgot to write
notes about the scenario where the problem occured - I am usually pretty
meticulous about that because my memory of these things is really bad.
I hope you'll forgive me for not providing a solid testcase - if it's
any consolation, I've searched for a long time before giving up :-(.
Based on the testsuite reports that I have, I think that this happened
while inserting a breakpoint, as follow:
(gdb) break x
Cannot access memory at address 0x200093b4
What happened is that rs6000_convert_from_func_ptr_addr tried to read
the memory at the given address, and fail because of an exception.
It seems pretty clear that, if the address was in fact a descriptor,
GDB would have been able to read the target memory region.
So this patch protects the memory-read against exceptions, and treats
such exceptions as an indication that our address is not a descriptor.
gdb/ChangeLog:
* rs6000-aix-tdep.c: #include exceptions.h.
(rs6000_convert_from_func_ptr_addr): If an exception is thrown
while reading the memory at ADDR, then ADDR cannot be a function
descriptor.