Commit Graph

20099 Commits

Author SHA1 Message Date
Doug Evans 680d1742c4 * psymtab.c (expand_symtabs_matching_via_partial): Fix file name
matching test.
2013-05-08 22:38:19 +00:00
Joel Brobecker 17e760ae36 Avoid duplicating text in sol-thread.c:info_cb
This is a minor cleanup that helps avoiding duplicating the output
of a command when handling alternative situations.

gdb/ChangeLog:

        * sol-thread.c (info_cb): Factorize the code a little.
2013-05-08 06:25:21 +00:00
Joel Brobecker c0f5f49044 Improve output of "maintenance info sol-threads" command.
This patch does the following:
  - Puts the startfunc and "Sleep func" info on the same line;
  - Renames "Sleep func" into "sleepfunc" to be consistent with
    "startfunc"
  - Avoids the use of a '-' as a separate before the "sleepfunc"
    output, because the '-' looks odd and out of place when the
    "startfunc" field is not printed (ti.ti_startfunc is nul).
  - Use a '=' instead of ':' and avoids the space between
    the name of the value and its value, mostly to help group
    the value with its name.

For the record, this is how the new outout now looks like:

    (gdb) maintenance info sol-threads
    user   thread #1, lwp 1, (active)
    system thread #2, lwp 2, (active)
    system thread #3, lwp 0, (asleep)    sleepfunc=0xff32d9e0
    user   thread #4, lwp 4, (asleep)    startfunc=[...].task_wrapper   sleepfunc=0xff3290f0
    system thread #5, lwp 7, (active)    startfunc=_co_timerset
    user   thread #6, lwp 8, (active)    startfunc=[...].task_wrapper

gdb/ChangeLog:

        * sol-thread.c (info_cb): Rework the output of the "maintenance
        info sol-threads" command a bit.
2013-05-08 06:23:50 +00:00
Joel Brobecker 5d74e06193 ti.ti_pc vs ti.ti_startfunc copy-pasto in sol-thread.c:info_cb
gdb/ChangeLog:

        * sol-thread.c (info_cb) [ti.ti_state == TD_THR_SLEEP]:
        Replace ti.ti_startfunc by ti.ti_pc.

Probably OK to commit without approval, so will likely do so in the
next few days.
2013-05-08 06:19:32 +00:00
Joel Brobecker 814a3ff71b Dummy implementation of solib_aix_free_library_list if libexpat missing.
gdb/ChangeLog:

        * solib-aix.c (solib_aix_free_library_list): New function
        for the case where HAVE_LIBEXPAT is not defined.
2013-05-08 06:10:03 +00:00
Sergio Durigan Junior 58ce7251e8 gdb/
2013-05-07  Sergio Durigan Junior  <sergiodj@redhat.com>

	PR breakpoints/15413:
	* breakpoint.c (condition_completer): Simplify the code to
	disconsider multiple locations of breakpoints when completing the
	"condition" command.

gdb/testsuite/
2013-05-07  Sergio Durigan Junior  <sergiodj@redhat.com>

	PR breakpoints/15413:
	* gdb.base/pending.exp: Add test for completion of the "condition"
	command for pending breakpoints.
	* gdb.linespec/linespec.ex: Add test for completion of the
	"condition" command when dealing with multiple locations.
2013-05-07 17:04:29 +00:00
Pierre Muller be8b1ea676 * common/linux-btrace.c: ARI fix: Include "gdb_wait.h"
instead of <sys/wait.h>.
2013-05-07 13:04:58 +00:00
Pierre Muller 1e52bda604 * nios2-tdep.c (nios2_dwarf_reg_to_regnum): ARI fix: remove
trailing new line from warning message.
2013-05-07 13:02:19 +00:00
Pierre Muller 27fd0c6b3f * contrib/ari/gdb_ari.sh (SOLIB_ADD, SOLIB_CREATE_INFERIOR_HOOK)
(PC_SOLIB): Change type from ari_deprecate to ari_regression.
2013-05-07 13:00:07 +00:00
Joel Brobecker e228ac8788 Add missing ChangeLog entries...
... for the following commits:

2013-05-07  Joel Brobecker  <brobecker@adacore.com>

       * rs6000-nat.c (rs6000_core_ldinfo): Remove '\n' at end of
       error message (ARI fix).

2013-05-07  Joel Brobecker  <brobecker@adacore.com>

       * features/library-list-aix.dtd: Replace library-list by
       library-list-aix.
       * rs6000-nat.c: Replace library-list by library-list-aix
       throughout.
       * solib-aix.c: Likewise.

2013-05-07  Joel Brobecker  <brobecker@adacore.com>

       * target.h (enum target_object) [TARGET_OBJECT_LIBRARIES_AIX]:
       Renames TARGET_OBJECT_AIX_LIBRARIES.
       * rs6000-nat.c: Replace TARGET_OBJECT_AIX_LIBRARIES with
       TARGET_OBJECT_LIBRARIES_AIX throughout.
       * solib-aix.c: Likwise.

There were added, but accidently not checked in.
2013-05-07 12:40:08 +00:00
Yao Qi 26a4dda9e5 gdb/
* solib-dsbt.c (struct dsbt_info) <enable_break2_done>: Remove.
	(get_dsbt_info, enable_break, dsbt_clear_solib): Update.
2013-05-07 09:26:09 +00:00
Yao Qi 3582629f2d gdb/
* solib-dsbt.c (enable_break): Declare.
	(dsbt_current_sos): Remove call to enable_break2.
	(enable_break2): Rename to enable_break.  Set solib breakpoint
	on '_dl_debug_state'.
	(enable_break): Remove.
2013-05-07 09:23:28 +00:00
Luis Machado aacbb8a556 gdb/
* ppc-linux-nat.c (ppc_linux_new_thread): Clear the new thread's
	debug state prior to replicating existing hardware watchpoints or
	breakpoints.

	gdb/testsuite/
	* gdb.threads/wp-replication.c: New file.
	* gdb.threads/wp-replication.exp: New file.
2013-05-07 07:43:33 +00:00
Jan Kratochvil 0c01335354 gdb/
* gcore.c (gcore_create_callback): Ignore sections with
	separate_debug_objfile_backlink != NULL.
2013-05-07 01:38:04 +00:00
Sandra Loosemore a1217d97c4 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
Andrew Jenner  <andrew@codesourcery.com>
	    Chung-Lin Tang  <cltang@codesourcery.com>
	    Julian Brown  <julian@codesourcery.com>

	Based on the nios2-elf port from Altera Corporation.

	gdb/
	* Makefile.in (ALL_TARGET_OBS): Add nios2-tdep.o and
	nios2-linux-tdep.o.
	(HFILES_NO_SRCDIR): Add nios2-tdep.h.
	(ALLDEPFILES): Add nios2-tdep.c and nios2-linux-tdep.c.
	* configure.tgt: Add nios2*-*-linux* and nios2*-*-* targets.
	* nios2-tdep.h: New.
	* nios2-tdep.c: New.
	* nios2-linux-tdep.c: New.
	* features/Makefile (WHICH): Add nios2-linux.
	(nios2-linux-expedite): Set.
	* features/nios2-cpu.xml: New.
	* features/nios2.xml: New.
	* features/nios2-linux.xml: New.
	* features/nios2.c: New (autogenerated).
	* features/nios2-linux.c: New (autogenerated).
	* regformats/nios2-linux.dat: New (autogenerated).
	* NEWS (Changes since GDB 7.6): Add new Nios II targets
	and commands.

	gdb/doc/
	* gdb.texinfo (Nios II): New section.
	(Nios II Features): New section.
2013-05-07 01:09:29 +00:00
Doug Evans 3b7bacacfd * symfile.c: Whitespace cleanup. 2013-05-07 00:02:12 +00:00
Doug Evans 0892cb63bd * solist.h (struct target_so_ops): New member clear_so.
* solib-svr4.c (svr4_clear_so): New function.
	(_initialize_svr4_solib): Set svr4_so_ops.clear_so.
	* solib.c (clear_so): Renamed from free_so_symbols.
	All callers updated.  Call target clear_so if it exists.
2013-05-06 22:18:39 +00:00
Tom Tromey 40501e00a1 * ada-lang.c (ada_value_primitive_packed_val): Don't
call value_incref.
	* value.c (set_value_parent): Incref the new parent and decref
	the old parent.
	(value_copy, value_primitive_field): Use set_value_parent.
2013-05-06 19:46:15 +00:00
Tom Tromey b6807d988a * dwarf2loc.c (invalid_synthetic_pointer): Move earlier.
(indirect_pieced_value): Call dwarf2_fetch_constant_bytes
	if needed.
	* dwarf2loc.h (dwarf2_fetch_constant_bytes): Declare.
	* dwarf2read.c (write_constant_as_bytes)
	(dwarf2_fetch_constant_bytes): New functions.
gdb/testsuite
	* gdb.dwarf2/implptrconst.c: New file.
	* gdb.dwarf2/implptrconst.exp: New file.
	* lib/dwarf.exp (Dwarf::_nz_quote): New proc.
	(Dwarf::_handle_DW_FORM): Handle DW_FORM_block1.
	(Dwarf::_location): Handle DW_OP_GNU_implicit_pointer.
2013-05-06 19:44:04 +00:00
Tom Tromey 3aef2284c6 * dwarf2read.c (dwarf2_const_value_data): Remove unused
parameters.
	(dwarf2_const_value_attr): Update.
2013-05-06 19:39:09 +00:00
Tom Tromey 66f65e2b48 * somread.c (som_symfile_offsets): Add 'const' to addrs.
* machoread.c (macho_symfile_offsets): Add 'const' to addrs.
	* xcoffread.c (xcoff_symfile_offsets): Add 'const' to addrs.
	Remove declaration.
2013-05-06 19:38:04 +00:00
Tom Tromey 7919a97345 * dwarf2read.c (dwarf2_const_value_attr): Use 'obstack', not
objfile's obstack.
2013-05-06 19:28:36 +00:00
Doug Evans 3189cb1297 * dbxread.c (process_one_symbol): Constify section_offsets parameter.
* stabsread.h (process_one_symbol): Update declaration.
	* dwarf2read.c (dw2_relocate): Constify new_offsets, delta parameters.
	* elfread.c (elf_symfile_relocate_probe): Ditto.
	* psymtab.c (relocate_psymtabs): Ditto.
	* objfiles.c (objfile_relocate1): Constify new_offsets parameter.
	(objfile_relocate): Ditto.
	* objfiles.h (objfile_relocate): Update declaration.
	* symfile.c (relative_addr_info_to_section_offsets): Constify
	addrs parameter.
	(default_symfile_offsets): Ditto.
	(syms_from_objfile_1): Constify offsets parameter.
	(syms_from_objfile): Ditto.
	(symbol_file_add_with_addrs_or_offsets): Ditto.
	(symfile_map_offsets_to_segments): Constify data parameter.
	* symfile.h (struct quick_symbol_functions): Constify new_offsets,
	delta parameters of member relocate.
	(struct sym_probe_fns): Constify new_offsets,
	delta parameters of member sym_relocate_probe.
	(struct sym_fns): Constify section_addr_info parameter of member
	sym_offsets.
	(relative_addr_info_to_section_offsets): Update declaration.
	(default_symfile_offsets): Ditto.
	(syms_from_objfile): Ditto.
	(symfile_map_offsets_to_segments): Ditto.
2013-05-06 19:15:17 +00:00
Doug Evans a7bfba49b2 * symfile.c (syms_from_objfile_1): Use correct section count when
objfile->sf == NULL.
2013-05-06 18:50:08 +00:00
Mike Frysinger 5f8e0b8f4f gdb: btrace: fix indentation style
Most of this func had the incorrect indentation level (starting with 4
spaces instead of 2).
2013-05-06 18:03:33 +00:00
Doug Evans ea52d8933d * psympriv.h (struct partial_symtab): Augment comment for member
section_offsets.
2013-05-06 16:45:13 +00:00
Joel Brobecker 4d1eb6b4d2 Reimplement shared library support on ppc-aix...
... using the target_so_ops framework.

gdb/ChangeLog:

        * target.h (TARGET_OBJECT_AIX_LIBRARIES): New target_object enum.
        * features/library-list-aix.dtd: New file.
        * solib-aix.h, solib-aix.c: New file.
        * rs6000-aix-tdep.c: #include "solib.h" and "solib-aix.h".
        (rs6000_find_toc_address_hook): Delete.
        (rs6000_push_dummy_call): Rewrite code setting the TOC value.
        (rs6000_aix_init_osabi): Register solib_aix_so_ops.
        * rs6000-nat.c: Remove "xcoffsolib.h" include.  Include
        "xml-utils.h".
        (map_vmap, vmap_exec, vmap_ldinfo, add_vmap, objfile_symbol_add)
        (vmap_symtab, fixup_breakpoints): Delete.
        (rs6000_xfer_shared_libraries): New function.
        (rs6000_xfer_partial): Add TARGET_OBJECT_AIX_LIBRARIES handling.
        (vmap_secs, bss_data_overlap, vmap_add_symbols): Delete.
        (xcoff_relocate_symtab, xcoff_relocate_core): Delete.
        (rs6000_ptrace_ldinfo, rs6000_core_ldinfo)
        (rs6000_xfer_shared_library): New function.
        (find_toc_address): Delete.
        (_initialize_rs6000_nat): Do not set rs6000_find_toc_address_hook.
        * rs6000-tdep.h (rs6000_find_toc_address_hook): Remove.
        * xcoffread.c (record_minimal_symbol): Reloate symbol address
        before creating minimal symbol.  Adjust function description
        accordingly.
        (scan_xcoff_symtab): Replace call to
        prim_record_minimal_symbol_and_info by call to
        record_minimal_symbol.
        (xcoff_symfile_offsets): Reimplement mostly as a wrapper
        around default_symfile_offsets.
        * configure.tgt: Add solib-aix.o to gdb_target_obs for
        powerpc-aix targets.
        * config/rs6000/nm-rs6000.h: Delete.
        * config/powerpc/aix.mh (NAT_FILE): Delete.
        (NATDEPFILES): Remove xcoffsolib.o.
        * Makefile.in (XMLFILES): Add library-list-aix.dtd.
        (ALL_TARGET_OBS): Add solib-aix.o.
        (HFILES_NO_SRCDIR): Remove xcoffsolib.h and
        config/rs6000/nm-rs6000.h.  Add solib-aix.h.
        (ALLDEPFILES): Add solib-aix.c.  Remove xcoffsolib.c.
        * xcoffsolib.h, xcoffsolib.c: Delete.

        * solib.c (reload_shared_libraries): Remove reference to
        SOLIB_CREATE_INFERIOR_HOOK.
        * breakpoint.c (handle_solib_event): Remove reference to SOLIB_ADD.
        (disable_breakpoints_in_shlibs): Remove reference to PC_SOLIB.
        (momentary_bkpt_re_set): Replace SOLIB_ADD by solib_add in
        comment.
        * corelow.c (deprecated_core_resize_section_table): Delete.
        * exec.c: Remove include of xcoffsolib.h".
        (map_vmap, vmap): Delete.
        (exec_close_1): Remove references to vmap.
        (exec_file_attach): Remove vmap handling code, and reference
        to DEPRECATED_IBM6000_TARGET.
        (bfdsec_to_vmap): Delete.
        (exec_files_info): Remove block of code handling VMAP.
        * infcmd.c (post_create_inferior): Remove reference to
        SOLIB_CREATE_INFERIOR_HOOK and SOLIB_ADD.
        * infrun.c (follow_exec): Remove reference to
        SOLIB_CREATE_INFERIOR_HOOK.
        * stack.c (print_frame): Remove reference to PC_SOLIB.
        * solib-dsbt.c (dsbt_current_sos): Adjust comment.
        (dsbt_relocate_main_executable): Likewise.
        * solib-frv.c (frv_current_sos): Likewise.

gdb/doc/ChangeLog:

        * gdbint.texinfo (Algorithms): Remove entries documenting
        DEPRECATED_IBM6000_TARGET, SOLIB_ADD, and
        SOLIB_CREATE_INFERIOR_HOOK.
2013-05-06 14:15:50 +00:00
Joel Brobecker 0c4f667cfe Fix -Wpointer-sign warning in sol-thread.c
gdb/ChangeLog:

        * sol-thread.c (rw_common): Cast BUF to "gdb_byte *" in calls
        to target_write_memory and target_read_memory.
2013-05-06 12:55:52 +00:00
Joel Brobecker 726ce67c26 darwin: warning resuming inferior after attach
This patch avoids a warning when resuming the execution of a program
that we attached to. For instance:

    (gdb) attach 29989
    (gdb) continue
    Continuing.
    warning: Mach error at "/[...]/darwin-nat.c:738" in function
             "darwin_resume_thread": (os/kern) failure (0x5)

The warning is relatively harmless, but worrisome for the average
user.  The warning comes from the fact that darwin_wait recorded
that the fake stop event corresponding to the suspend action was
caused by the main thread being suspended on a SIGTRAP. As a result
of this, when resuming the program's execution, we try to resume
the thread's execution as well.  This is where the issue occurs,
as the thread was not in fact suspended, thus triggering the warning.

gdb/ChangeLog:

        * darwin-nat.c (darwin_setup_fake_stop_event): New function.
        (darwin_attach): Adjust using darwin_setup_fake_stop_event.
2013-05-06 12:41:14 +00:00
Joel Brobecker c8c9911faa darwin-nat: Print all hex values with 0x prefix.
gdb/ChangeLog:

        * darwin-nat.c: Replace all "%x" instances in format strings
        into "0x%x" throughout.
2013-05-06 12:37:52 +00:00
Joel Brobecker fda184b639 darwin-nat.c: Do not use gdb_assert on system call outcomes.
There were many cases were we make a system call which could fail
due to reasons outside of the debugger control. We should handle
these situations a little more gracefully than triggering an
internal error.

gdb/ChangeLog:

        * darwin-nat.c (darwin_mourn_inferior): Replace call to
        gdb_assert by call to MACH_CHECK_ERROR.
        (darwin_attach_pid): Raise an error rather than a failed
        assertion when various system calls failed.  Report a warning
        instead of raising a failed assertion when PREV_NOT is not NULL
        after call to mach_port_request_notification.
        (darwin_ptrace_me): Raise an error rather than a failed
        assertion when read returns nonzero.
2013-05-06 12:35:46 +00:00
Joel Brobecker d1d69afb19 amd64-darwin-tdep.c: Remove #include "gdb_assert.h"
gdb_assert.h is already included from darwin-nat.h, so no need to
include it again...

gdb/ChangeLog:

        * amd64-darwin-tdep.c: Remove #include "gdb_assert.h".
2013-05-06 12:33:00 +00:00
Jan Kratochvil dc90b24d1b gdb/
* cleanups.c (restore_my_cleanups): New gdb_assert for SENTINEL_CLEANUP.
2013-05-05 16:56:07 +00:00
Jan Kratochvil faab992242 gdb/
* event-top.c (display_gdb_prompt): Call missing do_cleanups.
	* infcmd.c (get_return_value) <!stop_regs>: Do not overwrite CLEANUP.
	* symfile.c (symfile_bfd_open): New variable back_to.  Do not leave
	a stale cleanup.  Fix double free of NAME.
2013-05-05 16:54:26 +00:00
Eli Zaretskii e0ea48a0d7 Announce thread death on MS-Windows.
* windows-nat.c (windows_delete_thread): Accept an additional
	argument, the thread's exit code, and announce thread death when
	print_thread_events is non-zero and we are deleting a thread that
	is not the main thread.
	(get_windows_debug_event): Pass thread exit code to
	windows_delete_thread.
2013-05-04 13:36:18 +00:00
Kevin Buettner 83b2706ad5 * v850-tdep.c (elf-bfd.h, elf/v850.h): Include.
(R_149_REGNUM, E_NUM_OF_V850E2_REGS, E_SELID_1_R0_REGNUM)
	(E_SELID_1_R31_REGNUM, E_SELID_2_R0_REGNUM, E_SELID_2_R31_REGNUM)
	(E_SELID_3_R0_REGNUM, E_SELID_3_R31_REGNUM, E_SELID_4_R0_REGNUM)
	(E_SELID_4_R31_REGNUM, E_SELID_5_R0_REGNUM, E_SELID_5_R31_REGNUM)
	(E_SELID_6_R0_REGNUM, E_SELID_6_R31_REGNUM, E_SELID_7_R0_REGNUM, E_SELID_7_R31_REGNUM)
	(E_VR0_REGNUM, E_VR31_REGNUM, E_NUM_OF_V850E3V5_REGS): Define.
	(v850_abi, V850_ABI_GCC, V850_ABI_RH850): New enum and constants.
	(gdbarch_tdep): New struct.
	(v850e2_register_name): Use E_NUM_OF_V850E2_REGS instead of
	E_NUM_REGS.
	(v850e3v5_register_name): New function.
	(v850_register_type): v850e3v5 vector registers are 64-bits wide.
	(v850_use_struct_convention): Add `gdbarch' parameter.  Add new
	code handling the struct return conventions for the RH850 ABI.
	Update all callers.
	(v850_eight_byte_align_p): New function.
	(v850_push_call_dummy): Push structs by value, not by reference
	for the RH850 ABI.  Add support for eight byte alignment.
	(v850_dbtrap_breakpoint_from_pc): New function.
	(v850_gdbarch_init): Add ABI detection code.  Register
	v850e3v5_register_name for the v850e3v5 architecture.  Set the
	number of registers for v850e3v5.  Register
	v850_dbtrap_breakpoint_from_pc as appropriate.
	(_initialize_gdbarch_init): Registration bfd_arch_v850_rh850.
2013-05-04 06:25:20 +00:00
Doug Evans d445b2f6a4 * objfiles.c (objfile_relocate): Use gdb_bfd_count_sections instead
of bfd_count_sections.
	* solib-target.c (solib_target_relocate_section_addresses): Ditto.
	* symfile.c (default_symfile_offsets): Ditto.
	(syms_from_objfile_1): Ditto.  Make dummy addrs list an array of
	one entry, not bfd_count_sections entries.
2013-05-04 06:19:31 +00:00
Kevin Buettner b3ce41ea47 * rl78-tdep.c (rl78_register_reggroup_p): Include SP in the
`save' and `restore' register groups.  Don't include SPL
	or SPH in these groups.
	(rl78_dwarf_reg_to_regnum):  Adjust mapping for
	RL78_PC_REGNUM.  Add mappings for RL78_PSW_REGNUM,
	RL78_ES_REGNUM, and RL78_CS_REGNUM.
	(rl78_gdbarch_init): Set `dwarf2_addr_size' to 4.  Invoke
	dwarf2_append_unwinders().
2013-05-04 06:14:53 +00:00
Philippe Waroquiers 96f7d3f166 Fix to handle properly 'catch signal SIGINT' and SIGTRAP 2013-05-03 19:16:56 +00:00
Joel Brobecker b9dd19477d Fix various -Wpointer-sign warnings in darwin-nat.c
gdb/ChangeLog:

        * darwin-nat.c (darwin_read_write_inferior): Change types
        of parameters rdaddr and wraddr to "gdb_byte *". Change type
        of copy_count to "mach_msg_type_number_t".
        (darwin_read_dyld_info): Change type of parameter
        rdaddr to "gdb_byte *".
2013-05-01 14:54:18 +00:00
Joel Brobecker 4ca18a63a8 Fix -Wpointer-sign errors in solib-ia64-hpux.c
gdb/ChangeLog:

        * solib-ia64-hpux.c (ia64_hpux_read_dynamic_info): Change cast
        of &info->load_map from "char *" to "gdb_byte *".
2013-05-01 14:33:00 +00:00
Joel Brobecker 2b692d328b Fix -Wpointer-sign errors in ia64-tdep.c
gdb/ChangeLog:

        * ia64-tdep.c (ia64_access_fpreg): Change cast of val
        from "char *" to "gdb_byte *".
        (ia64_access_rse_fpreg, ia64_access_mem): Likewise.
2013-05-01 14:31:55 +00:00
Doug Evans 6a506a2dcb * dwarf2read.c (lookup_dwo_unit): Return NULL if DWO not found.
(init_cutu_and_read_dies): Flag a complaint, not error, for bad
	DWO stub.  If DWO isn't found, just use stub.
	(lookup_dwo_cutu): Don't try DWO if there's a DWP file.
2013-04-30 23:19:41 +00:00
Doug Evans a98c29a089 * dwarf2read.c (dw2_find_symbol_file): Initialize filename before
calling init_cutu_and_read_dies.
2013-04-30 21:11:50 +00:00
Walfred Tedeschi f92b06daf9 Fix display of structures/bitfields in register description.
Add support for displaying structures and bitfields for registers when
executing "maint print c-tdesc". This command is also used when
converting the xml target description file into c file.

Example of the behaviour is given below reporting a snipet of the xml file
and a snippet of the c code generated.

XML file contains:
...
    <union id="vecint">
      <field name="v4" type="v4int8"/>
      <field name="v2" type="v2int16"/>
    </union>

    <struct id="struct1">
      <field name="v4" type="v4int8"/>
      <field name="v2" type="v2int16"/>
    </struct>

    <struct id="struct2" size="8">
      <field name="f1" start="0" end="34"/>
      <field name="f2" start="63" end="63"/>
    </struct>
...

Setting this xml file as target description file and
issuing the maintenance print c-tdesc the following output
is obtained:

  feature = tdesc_create_feature (result, "extra");
  field_type = tdesc_named_type (feature, "int8");
  tdesc_create_vector (feature, "v4int8", field_type, 4);

  field_type = tdesc_named_type (feature, "int16");
  tdesc_create_vector (feature, "v2int16", field_type, 2);

  type = tdesc_create_union (feature, "vecint");
  field_type = tdesc_named_type (feature, "v4int8");
  tdesc_add_field (type, "v4", field_type);
  field_type = tdesc_named_type (feature, "v2int16");
  tdesc_add_field (type, "v2", field_type);

C output is not supported type "struct1".

This is finally the issue.

2013-03-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>

        * target-descriptions.c (maint_print_c_tdesc_cmd):
        Add case to parse structures as register types and
        bitfields.

testsuite/

	* gdb.xml/maint_print_struct.exp: New file.
	* gdb.xml/maint_print_struct.xml: New file.

Change-Id: I2e20b095d508319c80275e724a9452c7e2834067
Signed-off-by: Walfred Tedeschi <walfred.tedeschi@intel.com>
2013-04-30 12:33:52 +00:00
Joel Brobecker f1d02dd44d Fix date in some of my recent ChangeLog entries... 2013-04-30 11:56:23 +00:00
Joel Brobecker 019c1128ac Fix -Wpointer-sign warning in sol-thread.c
This fixes a couple of compiler warnings in rw_common when calling
target_read_memory/target_write_memory due to the type of parameter
"buf" (char *) not matching what these function expect (gdb_byte *).

gdb/ChangeLog:

        * sol-thread.c (rw_common): Change type of parameter "buf"
        to "gdb_byte *".
        (ps_pdwrite, ps_ptwrite): Cast parameter "buf" in call to
        rw_common to "gdb_byte *" instead of "char *".
2013-04-30 11:52:13 +00:00
Joel Brobecker 5812197ca1 Fix build error in sol-thread.c:info_cb
gdb/ChangeLog:

        * sol-thread.c (info_cb) [ti.ti_startfunc != 0]: Change type
        of local variable msym to const struct bound_minimal_symbol.
        Adjust use accordingly.
        [ti.ti_state == TD_THR_SLEEP]: Likewise.
2013-04-30 11:36:45 +00:00
Walfred Tedeschi 95eebdcc1f Add myself as a maintainer.
Change-Id: Ie1b0cb082a384144eef327e9294949e9bacc4415
2013-04-30 11:17:20 +00:00
Thomas Schwinge ecccb8133f 2013-04-30 Samuel Thibault <samuel.thibault@gnu.org>
* i386gnu-nat.c (CREG_OFFSET): New macro.
	(creg_offset): New array.
	(CREG_ADDR): Use creg_offset instead of reg_offset.
2013-04-30 09:27:43 +00:00