Pedro Alves [Fri, 19 Apr 2013 15:27:06 +0000 (15:27 +0000)]
gdb_byte for binary buffer, char for string: remote.c, tracepoint.c.
While the RSP is largely ASCII based (hence the packet buffer type is
char *), at places we pass around 8-bit binary packets in that buffer.
Functions like hex2bin or remote_escape_output conceptually are
handling binary buffers, so I left them as working with gdb_byte, and
added casts where necessary. Whether these are host bytes or target
bytes is blurry at present, so this is largely a matter of taste.
Switching some of these functions to take "char *" or "void *" would
be equally good.
gdb/
2013-04-19 Pedro Alves <palves@redhat.com>
* remote.c (remote_write_bytes_aux, compare_sections_command)
(remote_read_qxfer)
(remote_search_memory, remote_hostio_pwrite, remote_hostio_pread)
(remote_hostio_readlink, remote_bfd_iovec_pread)
(remote_set_trace_notes): Use gdb_byte when RSP buffer is used as
binary buffer, and char when buffer is used as string.
* tracepoint.c (encode_source_string, tfile_write_uploaded_tp)
(trace_save, tfile_open, traceframe_walk_blocks)
(tfile_fetch_registers): Likewise.
Pedro Alves [Fri, 19 Apr 2013 15:26:17 +0000 (15:26 +0000)]
serial_write: change prototype to take a void-pointer buffer.
While remote.c works with "char *" buffers most of the time, other
remote targets have binary-ish-er protocols, and choose to use
"unsigned char" throughout, like e.g., remote-mips.c or
remote-m32r-sdi.c. That results in -Wpointer-sign warnings in those
targets, unless we add casts in calls to serial_write. Since
serial_write is only concerned about sending raw host bytes out, and
serial_ops->write_prim already works with "void *"/"size_t", a similar
interface to the "write" or "send" system calls, I find it natural to
change serial_write's prototype accordingly, avoiding the need for
casts.
Tested on x86_64 Fedora 17, and also by building x86_64-mingw32
and DJGPP/go32 -hosted gdbs.
gdb/
2013-04-19 Pedro Alves <palves@redhat.com>
* ser-base.c (ser_base_write): Change prototype -- take 'void *'
buffer and size_t size. Adjust.
* ser-base.h (ser_base_write): Adjust.
* ser-go32.c (cnts): Change type to size_t.
(dos_write): Change prototype -- take 'void *'
buffer and size_t size. Adjust.
(dos_info): Print elements of 'cnts' as unsigned long.
* serial.c (serial_write): Likewise.
* serial.h (serial_write): Adjust.
(struct serial_ops) <write>: Change prototype -- take 'void *'
buffer and size_t size. Adjust.
Pedro Alves [Fri, 19 Apr 2013 15:24:55 +0000 (15:24 +0000)]
Cast result of obstack_base to gdb_byte * in a couple spots.
obstack_base returns char *. Need to cast to gdb_byte * in a couple spots.
gdb/
2013-04-19 Pedro Alves <palves@redhat.com>
* c-lang.c (evaluate_subexp_c): Cast result of obstack_base to
gdb_byte *.
* linux-tdep.c (linux_make_mappings_corefile_notes): Likewise.
Pedro Alves [Fri, 19 Apr 2013 15:24:25 +0000 (15:24 +0000)]
-Wpointer-sign: alpha-tdep.c.
../../src/gdb/alpha-tdep.c: In function ‘alpha_extract_return_value’:
../../src/gdb/alpha-tdep.c:520:4: error: pointer targets in passing argument 3 of ‘regcache_cooked_read_signed’ differ in signedness [-Werror=pointer-sign]
In file included from ../../src/gdb/alpha-tdep.c:36:0:
We use regcache_cooked_read_unsigned everywhere else too.
2013-04-19 Pedro Alves <palves@redhat.com>
* alpha-tdep.c (alpha_extract_return_value): Use
regcache_cooked_read_unsigned to read 'v0'.
Pedro Alves [Fri, 19 Apr 2013 15:23:52 +0000 (15:23 +0000)]
-Wpointer-sign: xtensa-tdep.c.
../../src/gdb/xtensa-tdep.c:2914:4: error: pointer targets in passing argument 7 of ‘xtensa_operand_get_field’ differ in signedness [-Werror=pointer-sign]
In file included from ../../src/gdb/xtensa-tdep.c:53:0:
../../src/gdb/../include/xtensa-isa.h:487:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’
../../src/gdb/xtensa-tdep.c:2916:4: error: pointer targets in passing argument 4 of ‘xtensa_operand_decode’ differ in signedness [-Werror=pointer-sign]
In file included from ../../src/gdb/xtensa-tdep.c:53:0:
../../src/gdb/../include/xtensa-isa.h:507:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’
../../src/gdb/xtensa-tdep.c:2918:4: error: pointer targets in passing argument 7 of ‘xtensa_operand_get_field’ differ in signedness [-Werror=pointer-sign]
In file included from ../../src/gdb/xtensa-tdep.c:53:0:
../../src/gdb/../include/xtensa-isa.h:487:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’
../../src/gdb/xtensa-tdep.c:2920:4: error: pointer targets in passing argument 4 of ‘xtensa_operand_decode’ differ in signedness [-Werror=pointer-sign]
In file included from ../../src/gdb/xtensa-tdep.c:53:0:
../../src/gdb/../include/xtensa-isa.h:507:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’
../../src/gdb/xtensa-tdep.c:2922:4: error: pointer targets in passing argument 7 of ‘xtensa_operand_get_field’ differ in signedness [-Werror=pointer-sign]
In file included from ../../src/gdb/xtensa-tdep.c:53:0:
../../src/gdb/../include/xtensa-isa.h:487:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’
../../src/gdb/xtensa-tdep.c:2924:4: error: pointer targets in passing argument 4 of ‘xtensa_operand_decode’ differ in signedness [-Werror=pointer-sign]
In file included from ../../src/gdb/xtensa-tdep.c:53:0:
../../src/gdb/../include/xtensa-isa.h:507:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’
Those bfd functions that decode instructions output uint32_t values.
Hence this fix:
2013-04-19 Pedro Alves <palves@redhat.com>
* xtensa-tdep.c (execute_l32e, execute_s32e): Change type of
parameters 'at', 'as' and 'offset' to uint32_t.
Pedro Alves [Fri, 19 Apr 2013 15:23:18 +0000 (15:23 +0000)]
-Wpointer-sign: aarch64-tdep.c.
../../src/gdb/aarch64-tdep.c: In function ‘aarch64_analyze_prologue’:
../../src/gdb/aarch64-tdep.c:713:7: error: pointer targets in passing argument 3 of ‘decode_cb’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/aarch64-tdep.c:386:1: note: expected ‘int *’ but argument is of type ‘unsigned int *’
../../src/gdb/aarch64-tdep.c:747:7: error: pointer targets in passing argument 3 of ‘decode_stur’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/aarch64-tdep.c:597:1: note: expected ‘int *’ but argument is of type ‘unsigned int *’
'is64' is just used as a boolean; signed/unsigned doesn't really matter.
2013-04-19 Pedro Alves <palves@redhat.com>
* aarch64-tdep.c (aarch64_analyze_prologue): Change type of local
'is64' to signed 'int'.
Pedro Alves [Fri, 19 Apr 2013 15:22:47 +0000 (15:22 +0000)]
-Wpointer-sign: s390-tdep.c.
-Wpointer-sign reveals a bunch of:
../../src/gdb/s390-tdep.c:1342:7: error: pointer targets in passing argument 4 of ‘is_rx’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/s390-tdep.c:1038:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’
../../src/gdb/s390-tdep.c:1343:9: error: pointer targets in passing argument 5 of ‘is_rxy’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/s390-tdep.c:1055:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’
../../src/gdb/s390-tdep.c:1344:9: error: pointer targets in passing argument 5 of ‘is_rxy’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/s390-tdep.c:1055:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’
...
../../src/gdb/s390-tdep.c:1363:7: error: pointer targets in passing argument 5 of ‘is_rs’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/s390-tdep.c:966:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’
../../src/gdb/s390-tdep.c:1364:9: error: pointer targets in passing argument 6 of ‘is_rsy’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/s390-tdep.c:983:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’
../../src/gdb/s390-tdep.c:1365:9: error: pointer targets in passing argument 6 of ‘is_rsy’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/s390-tdep.c:983:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’
...
I don't know much about s390, but from reading the code I believe the
right fix is to treat d2 as signed.
gdb/
2013-04-19 Pedro Alves <palves@redhat.com>
* s390-tdep.c (is_rs, is_rsy, is_rx, is_rxy): Change type of 'd2'
parameter to int *.
Pedro Alves [Fri, 19 Apr 2013 15:22:14 +0000 (15:22 +0000)]
ppc-linux-tdep.c: Wrong signness for buffer holding instructions.
There seems to be no reason for this buffer to be signed. We pass it
around to functions expecting it to be unsigned (which triggers
-Wpointer-sign warnings).
gdb/
2013-04-19 Pedro Alves <palves@redhat.com>
* ppc-linux-tdep.c (ppc_skip_trampoline_code): Change local
'insnbuf' buffer type to unsigned int[].
Pedro Alves [Fri, 19 Apr 2013 15:21:24 +0000 (15:21 +0000)]
mips-tdep.c: Wrong signness for local holding PC register.
Addresses on MIPS are signed, and we're indeed using
regcache_cooked_read_signed to read the PC, but, we're passing it the
address of an unsigned variable, which triggers a -Wpointer-sign
warning. I've chosen to change the variable's type. I believe this
will end up being the same (though I can't test it).
gdb/
2013-04-19 Pedro Alves <palves@redhat.com>
* mips-tdep.c (mips_read_pc): Change local 'pc' type to LONGEST.
Pedro Alves [Fri, 19 Apr 2013 15:15:55 +0000 (15:15 +0000)]
mep-tdep.c: Wrong signness for instruction buffer.
There seems to be no reason for this to be signed.
gdb/
2013-04-19 Pedro Alves <palves@redhat.com>
* mep-tdep.c (mep_get_insn): Change 'insn' parameter type to
unsigned long *.
Pedro Alves [Fri, 19 Apr 2013 15:15:21 +0000 (15:15 +0000)]
alpha-tdep.c/mips-tdep.c: "set heuristic-fence-post" is signed/zinteger.
These commands are currently var_zinteger, hence their control
variable is signed.
gdb/
2013-04-19 Pedro Alves <palves@redhat.com>
* alpha-tdep.c (heuristic_fence_post): Change type to int.
(alpha_heuristic_proc_start): Adjust to check -1 instead of
UINT_MAX.
* mips-tdep.c (heuristic_fence_post): Change type to int.
(heuristic_proc_start): Adjust to check -1 instead of UINT_MAX.
Pedro Alves [Fri, 19 Apr 2013 15:14:23 +0000 (15:14 +0000)]
cris-tdep.c: Use unsigned variable for unsigned command.
"set cris-version" is an unsigned command:
/* CRIS-specific user-commands. */
add_setshow_uinteger_cmd ("cris-version", class_support,
&usr_cmd_cris_version,
_("Set the current CRIS version."),
_("Show the current CRIS version."),
_("\
Set to 10 for CRISv10 or 32 for CRISv32 if autodetection fails.\n\
Defaults to 10. "),
Tested by building on x86_64 Fedora 17.
2013-04-19 Pedro Alves <palves@redhat.com>
* cris-tdep.c (usr_cmd_cris_version): Make unsigned.
(struct gdbarch_tdep) <cris_version>: Make unsigned.
(cris_spec_reg_applicable, cris_gdbarch_init): Adjust locals.
Pedro Alves [Fri, 19 Apr 2013 15:10:53 +0000 (15:10 +0000)]
-Wpointer-sign: gdb_byte -> char.
This is sort of the opposite of the previous patch. Places that
manipulate strings or interfaces that return strings are changed to
use char* instead of gdb_byte*.
gdb/
2013-04-19 Pedro Alves <palves@redhat.com>
* avr-tdep.c (avr_io_reg_read_command): New local 'bufstr'. Use
it to get a string view of the byte buffer.
* i386-cygwin-tdep.c (core_process_module_section): Change local 'buf'
type to gdb_byte *. Adjust.
* linux-tdep.c (linux_info_proc, linux_find_memory_regions_full):
Change local to char *.
* solib-darwin.c (find_program_interpreter): Change return type to
char *. Adjust.
(darwin_solib_get_all_image_info_addr_at_init): Adjust.
* solib-dsbt.c (enable_break2): Change local 'buf' to char *.
* solib-frv.c (enable_break2): Change local 'buf' to char *.
* solib-spu.c (spu_current_sos): Add gdb_byte * cast.
* solib-svr4.c (find_program_interpreter): Change return type to
char *. Adjust.
(enable_break): Change local 'interp_name' to char *.
* spu-multiarch.c (spu_xfer_partial): Add cast to 'char *'.
* spu-tdep.c (spu_pseudo_register_read_spu): Add cast to 'char *'.
(spu_pseudo_register_write_spu): Use char for string buffer.
Adjust.
(info_spu_event_command, info_spu_signal_command): Add casts to
'char *'.
Pedro Alves [Fri, 19 Apr 2013 15:09:46 +0000 (15:09 +0000)]
-Wpointer-sign: char -> gdb_byte.
-Wpointer-sign catches all these cases across the codebase that should
be using gdb_byte for raw target bytes. I think these are all
obvious, hence I've collapsed into a single patch.
gdb/
2013-04-19 Pedro Alves <palves@redhat.com>
* aarch64-tdep.c (aarch64_default_breakpoint): Change type to
gdb_byte[].
(aarch64_breakpoint_from_pc): Change return type to gdb_byte *.
* ada-lang.c (ada_value_assign): Use gdb_byte.
* alphanbsd-tdep.c (sigtramp_retcode): Change type to gdb_byte[].
(alphanbsd_sigtramp_offset): Use gdb_byte.
* arm-linux-tdep.c (arm_linux_arm_le_breakpoint)
(arm_linux_arm_be_breakpoint, eabi_linux_arm_le_breakpoint)
(eabi_linux_arm_be_breakpoint, arm_linux_thumb_be_breakpoint)
(arm_linux_thumb_le_breakpoint, arm_linux_thumb2_be_breakpoint)
(arm_linux_thumb2_le_breakpoint): Change type to gdb_byte[].
* arm-tdep.c (arm_stub_unwind_sniffer)
(arm_displaced_init_closure): Use gdb_byte.
(arm_default_arm_le_breakpoint, arm_default_arm_be_breakpoint)
(arm_default_thumb_le_breakpoint)
(arm_default_thumb_be_breakpoint): Change type to gdb_byte[].
* arm-tdep.h (struct gdbarch_tdep) <arm_breakpoint,
thumb_breakpoint, thumb2_breakpoint>: Change type to gdb_byte *.
* arm-wince-tdep.c (arm_wince_le_breakpoint)
(arm_wince_thumb_le_breakpoint): Change type to gdb_byte[].
* armnbsd-tdep.c (arm_nbsd_arm_le_breakpoint)
(arm_nbsd_arm_be_breakpoint, arm_nbsd_thumb_le_breakpoint)
(arm_nbsd_thumb_be_breakpoint): Change type to gdb_byte[].
* armobsd-tdep.c (arm_obsd_thumb_le_breakpoint)
(arm_obsd_thumb_be_breakpoint): Change type to gdb_byte[].
* cris-tdep.c (push_stack_item, cris_push_dummy_call)
(cris_store_return_value, cris_extract_return_value): Use
gdb_byte.
(constraint): Change type of parameter to char * from signed
char*. Use gdb_byte.
* dwarf2loc.c (read_pieced_value, write_pieced_value): Change type
of local buffer to gdb_byte *.
* dwarf2read.c (read_index_from_section): Use gdb_byte.
(create_dwp_hash_table): Change type of locals to gdb_byte *.
(add_address_entry): Change type of local buffer to gdb_byte[].
* frv-tdep.c (frv_adjust_breakpoint_address, find_func_descr)
(frv_push_dummy_call): Use gdb_byte.
* hppa-hpux-tdep.c (hppa_hpux_push_dummy_code)
(hppa_hpux_supply_ss_fpblock, hppa_hpux_supply_ss_wide)
(hppa_hpux_supply_save_state): Use gdb_byte.
* hppa-tdep.c (hppa32_push_dummy_call)
(hppa64_convert_code_addr_to_fptr): Use gdb_byte.
* ia64-tdep.c (extract_bit_field, replace_bit_field)
(slotN_contents, replace_slotN_contents): Change type of parameter
to gdb_byte *.
(fetch_instruction, ia64_pseudo_register_write)
(ia64_register_to_value, ia64_value_to_register)
(ia64_extract_return_value, ia64_store_return_value)
(ia64_push_dummy_call): Use gdb_byte.
* m32c-tdep.c (m32c_return_value): Remove cast.
* m68hc11-tdep.c (m68hc11_pseudo_register_write)
(m68hc11_push_dummy_call, m68hc11_store_return_value): Use
gdb_byte.
* mipsnbsd-tdep.c (mipsnbsd_get_longjmp_target): Use gdb_byte.
* mn10300-tdep.c (mn10300_store_return_value)
(mn10300_breakpoint_from_pc, mn10300_push_dummy_call): Use
gdb_byte.
* moxie-tdep.c (moxie_process_readu): Use gdb_byte.
(moxie_process_record): Remove casts.
* ppc-ravenscar-thread.c (supply_register_at_address)
(ppc_ravenscar_generic_store_registers): Use gdb_byte.
* ravenscar-thread.c (get_running_thread_id): Use gdb_byte.
* remote-m32r-sdi.c (m32r_fetch_register): Use gdb_byte.
* remote-mips.c (mips_xfer_memory): Use gdb_byte.
* remote.c (compare_sections_command): Use gdb_byte.
* score-tdep.c (score7_free_memblock): Change type of parameter to
gdb_byte *.
* sh-tdep.c (sh_justify_value_in_reg): Change return type to
gdb_byte *. Use gdb_byte.
(sh_push_dummy_call_fpu): Use gdb_byte.
(sh_extract_return_value_nofpu, sh_extract_return_value_fpu)
(sh_store_return_value_nofpu, sh_store_return_value_fpu)
(sh_register_convert_to_virtual, sh_register_convert_to_raw):
Change parameter type to 'gdb_byte *'. Use gdb_byte.
(sh_pseudo_register_read, sh_pseudo_register_write): Use gdb_byte.
* sh64-tdep.c (sh64_push_dummy_call): Use gdb_byte.
(sh64_store_return_value, sh64_register_convert_to_virtual):
Change parameter type to 'gdb_byte *'. Use gdb_byte.
(sh64_pseudo_register_write): Use gdb_byte.
* solib-darwin.c (darwin_current_sos): Add casts to 'gdb_byte *'.
* solib-irix.c (fetch_lm_info): Likewise. Use gdb_byte for byte
buffer.
(irix_current_sos): Use gdb_byte.
* solib-som.c (som_current_sos): Use gdb_byte.
* sparc-ravenscar-thread.c (supply_register_at_address)
(sparc_ravenscar_generic_store_registers): Use gdb_byte.
* spu-multiarch.c (spu_xfer_partial): Add cast to 'char *'.
* spu-tdep.c (spu_get_overlay_table): Use gdb_byte.
* tic6x-tdep.c (tic6x_breakpoint_from_pc): Change return type to
'gdb_byte *'.
* tic6x-tdep.h (struct gdbarch_tdep) <breakpoint>: Change type to
'gdb_byte *'.
* tracepoint.c (tfile_fetch_registers): Use gdb_byte.
* xstormy16-tdep.c (xstormy16_extract_return_value)
(xstormy16_store_return_value): Change parameter type to
'gdb_byte *'. Adjust.
(xstormy16_push_dummy_call): Use gdb_byte.
* xtensa-tdep.c (xtensa_scan_prologue, call0_ret)
(call0_analyze_prologue, execute_code): Use gdb_byte.
Pedro Alves [Fri, 19 Apr 2013 14:13:30 +0000 (14:13 +0000)]
Fix the x87 FP register printout when issuing the “info float” command.
Consider the following simple program:
.globl _start
.text
_start:
fldt val
.data
val: .byte 0x00,0x00,0x45,0x07,0x11,0x19,0x22,0xe9,0xfe,0xbf
With current GDB on x86-64 GNU/Linux hosts, after the moment the fldt
command has been executed the register st(0) looks like this,
according to the “info regs” output (TOP=7):
R7: Valid 0xffffffbffffffffeffffffe922191107450000 -0.
910676542908976927
which is clearly wrong (just count its length). The problem is due to
the printf statement (see patch) printing a promoted integer value of
a char argument "raw[i]", and, since char is signed on x86-64
GNU/Linux, the erroneous “ffffff” are printed for the first three
bytes which turn out to be "negative". The fix is to use gdb_byte
instead which is unsigned (and is the type of value_contents(), the
type to be used for raw target bytes anyway). After the fix the value
will be printed correctly:
R7: Valid 0xbffee922191107450000 -0.
910676542908976927
gdb/
2013-04-19 Vladimir Kargov <kargov@gmail.com>
Pedro Alves <palves@redhat.com>
* i387-tdep.c (i387_print_float_info): Use gdb_byte for pointer to
value contents.
gdb/testsuite/
2013-04-19 Vladimir Kargov <kargov@gmail.com>
Pedro Alves <palves@redhat.com>
* gdb.arch/i386-float.S: New file.
* gdb.arch/i386-float.exp: New file.
Kai Tietz [Fri, 19 Apr 2013 09:10:28 +0000 (09:10 +0000)]
* configure.tgt (i386-*-cygwin): Handle x86_64 cygwin.
Nick Clifton [Fri, 19 Apr 2013 08:12:30 +0000 (08:12 +0000)]
PR binutils/15356
* compress.c (decompress_contents): Always call inflateEnd, even
when another inflation operation fails.
[Note - the actual patch to compress.c was accidentally committed previously].
Alan Modra [Fri, 19 Apr 2013 00:00:04 +0000 (00:00 +0000)]
daily update
gdbadmin [Fri, 19 Apr 2013 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***
Luis Machado [Thu, 18 Apr 2013 10:08:08 +0000 (10:08 +0000)]
* gdb.mi/mi-var-create-rtti.exp: Create a variable of
type void *.
gdbadmin [Thu, 18 Apr 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Thu, 18 Apr 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Doug Evans [Wed, 17 Apr 2013 21:07:09 +0000 (21:07 +0000)]
* lib/dwarf.exp (Dwarf): New proc "tu".
* gdb.dwarf2/missing-sig-type.exp: New file.
Doug Evans [Wed, 17 Apr 2013 17:09:30 +0000 (17:09 +0000)]
* dwarf2read.c (struct signatured_type): New member type.
(struct attribute): Replace member signatured_type with signature.
(DW_SIGNATURE): Replaces DW_SIGNATURE_TYPE.
(read_call_site_scope): Call follow_die_ref instead of
follow_die_ref_or_sig.
(read_structure_type): Rewrite handling of signatured types.
(read_enumeration_type): Ditto.
(read_attribute_value): Update.
(build_error_marker_type): New function.
(lookup_die_type): Add assert. Rewrite handling of signatured types.
Don't call error for bad types, just build an error marker type.
(dump_die_shallow): Update.
(follow_die_sig_1): Renamed from follow_die_sig.
Don't call error for bad types, instead return NULL.
(follow_die_sig): New function.
(get_signatured_type, get_DW_AT_signature_type): New functions.
H.J. Lu [Wed, 17 Apr 2013 16:22:13 +0000 (16:22 +0000)]
Update copyright year on elf-ifunc.c
* elf-ifunc.c: Update copyright year.
Joel Brobecker [Wed, 17 Apr 2013 14:57:43 +0000 (14:57 +0000)]
Fix line length problem in last entry.
Yufeng Zhang [Wed, 17 Apr 2013 14:52:46 +0000 (14:52 +0000)]
gdb/
* aarch64-tdep.c (aarch64_write_pc): Removed.
(aarch64_gdbarch_init): Remove set_gdbarch_write_pc of the above function.
Nick Clifton [Wed, 17 Apr 2013 14:16:01 +0000 (14:16 +0000)]
* coffcode.h: Added a cast to void when a bfd_set_section_*()
macro's return value is ignored.
* elf32-hppa.c: Likewise.
* elf32-tic6x.c: Likewise.
* mach-o.c: Likewise.
* mmo.c: Likewise.
* opncls.c: Likewise.
* peicode.h: Likewise.
* elf32-m32r.c: Check return value of bfd_set_section_*().
* elfnn-ia64.c: Likewise.
* elfxx-mips.c: Likewise.
* vms-alpha.c: Likewise.
Nick Clifton [Wed, 17 Apr 2013 14:09:49 +0000 (14:09 +0000)]
PR binutils/15369
* cgen-dis.c (hash_insn_array): Use CGEN_CPU_INSN_ENDIAN instead
of CGEN_CPU_ENDIAN.
(hash_insns_list): Likewise.
Pedro Alves [Wed, 17 Apr 2013 09:58:15 +0000 (09:58 +0000)]
Use AC_DEFINE for USE_THREAD_DB
Use AC_DEFINE for USE_THREAD_DB instead of manually passing it down
through -D flags.
gdb/gdbserver/
2013-04-17 Pedro Alves <palves@redhat.com>
* configure.ac (USE_THREAD_DB): Delete variable.
(if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
Don't AC_SUBST USE_THREAD_DB.
* Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
* config.in, configure: Regenerate.
Yao Qi [Wed, 17 Apr 2013 01:02:02 +0000 (01:02 +0000)]
gdb/
* top.c (print_gdb_configuration): Print configure-time
parameter on using libbabeltrace or not.
Alan Modra [Wed, 17 Apr 2013 00:00:04 +0000 (00:00 +0000)]
daily update
gdbadmin [Wed, 17 Apr 2013 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***
Pedro Alves [Tue, 16 Apr 2013 18:22:15 +0000 (18:22 +0000)]
Only define 'struct lwp_info'::thread_known if using libthread-db.
A small cleanup. 'struct lwp_info'::thread_known is only useful for
thread-db.c.
gdbserver/
2013-04-16 Pedro Alves <palves@redhat.com>
* linux-low.h (struct lwp_info) <thread_known>: Move under
the USE_THREAD_DB #ifdef.
Pedro Alves [Tue, 16 Apr 2013 18:20:40 +0000 (18:20 +0000)]
Fix remaining GDBserver issues with !HAVE_THREAD_DB_H.
The previous patches are still not sufficient to build gdbserver with
our copy of thread_db.h.
../../../src/gdb/gdbserver/thread-db.c: In function ‘find_one_thread’:
../../../src/gdb/gdbserver/thread-db.c:316:6: error: ‘struct lwp_info’ has no member named ‘th’
../../../src/gdb/gdbserver/thread-db.c: In function ‘attach_thread’:
../../../src/gdb/gdbserver/thread-db.c:341:6: error: ‘struct lwp_info’ has no member named ‘th’
../../../src/gdb/gdbserver/thread-db.c: In function ‘thread_db_get_tls_address’:
../../../src/gdb/gdbserver/thread-db.c:514:47: error: ‘struct lwp_info’ has no member named ‘th’
make: *** [thread-db.o] Error 1
First, linux-low.h is including <thread_db.h> directly instead of our
gdb_thread_db.h, although thread-db.c includes the latter. Then the
'th' field of struct lwp_info is only defined if HAVE_THREAD_DB_H is
defined, which is not true if we're using our replacement copy of
thread_db.h. We have a USE_THREAD_DB symbol defined if we're building
thread-db.c that's ideal for this, however, it's currently only
defined when compiling linux-low.c (through a Makefile rule). The
patch makes it defined when compiling any file.
gdb/gdbserver/
2013-04-16 Pedro Alves <palves@redhat.com>
* Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
(linux-low.o): Delete rule.
* linux-low.h: Always include "gdb_thread_db.h" instead of
conditionally including thread_db.h.
(struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
HAVE_THREAD_DB_H.
Pedro Alves [Tue, 16 Apr 2013 18:19:14 +0000 (18:19 +0000)]
copyright.py: Don't update glibc_thread_db.h.
As glibc_thread_db.h is a 3rd party imported file, we should not
update its copyright year range in the new year process.
gdb/
2013-04-16 Pedro Alves <palves@redhat.com>
* copyright.py (EXCLUDE_LIST): Add gdb/common/glibc_thread_db.h.
Pedro Alves [Tue, 16 Apr 2013 18:18:12 +0000 (18:18 +0000)]
Fix previous entry.
Pedro Alves [Tue, 16 Apr 2013 18:17:11 +0000 (18:17 +0000)]
Update glibc_thread_db.h from upstream.
Attempting to build gdbserver with our copy of thread_db.h yields:
In file included from ../../../src/gdb/gdbserver/../common/gdb_thread_db.h:4:0,
from ../../../src/gdb/gdbserver/thread-db.c:30:
../../../src/gdb/gdbserver/../common/glibc_thread_db.h:108:3: error: unknown type name ‘uint32_t’
In file included from ../../../src/gdb/gdbserver/../common/gdb_thread_db.h:4:0,
from ../../../src/gdb/gdbserver/thread-db.c:30:
../../../src/gdb/gdbserver/../common/glibc_thread_db.h:199:5: error: unknown type name ‘uintptr_t’
../../../src/gdb/gdbserver/../common/glibc_thread_db.h:269:3: error: unknown type name ‘intptr_t’
../../../src/gdb/gdbserver/../common/glibc_thread_db.h:270:3: error: unknown type name ‘intptr_t’
We used to have a workaround for this, but the patch to import
gnulib's stdint.h removed it:
http://www.sourceware.org/ml/gdb-patches/2008-06/msg00050.html
and defs.h made to always include stdint.h. However, gdbserver
doesn't include stdint.h in its equivalent server.h.
Rather than working around the issue, I've imported a more recent
version from glibc, which itself includes <stdint.h>. Other than
copyright years and FSF snail mail address, the file hasn't been
touched since 2003 in glibc. AFAICS, our version was updated last in
2000-09-03.
A note on the apparent license change: before the previous patch, this
file's contents were part of gdb_thread_db.h, and we can see that its
license's text was changed in this patch
<http://sourceware.org/ml/gdb-patches/2009-03/msg00251.html>. That
was certainly just an easy to overlook grep/sed mistake that fell
through the cracks.
gdb/common/
2013-04-16 Pedro Alves <palves@redhat.com>
* glibc_thread_db.h: Update from upstream glibc
(git
568035b7874a099087b77f7bba3e36a1173787b0).
Pedro Alves [Tue, 16 Apr 2013 18:14:55 +0000 (18:14 +0000)]
Move fallback thread_db.h to a separate file.
Having this on a separate file makes it easier to import a new version
-- one can just copy over instead of having to care about preserving
the GDB-specific bits.
2013-04-16 Pedro Alves <palves@redhat.com>
* common/gdb_thread_db.h [!HAVE_THREAD_DB_H]: Factor out to ...
* common/glibc_thread_db.h: ... this new file ...
* common/gdb_thread_db.h [!HAVE_THREAD_DB_H]: ... and include it.
Pedro Alves [Tue, 16 Apr 2013 18:12:14 +0000 (18:12 +0000)]
PR build/11881: LIBTHREAD_DB_SO can be undefined.
This patch:
http://sourceware.org/ml/gdb-patches/2009-04/msg00115.html
Changed behaviour by only defining LIBTHREAD_DB_SO if thread_db.h exists. The
definition of LIBTHREAD_DB_SO and LIBTHREAD_DB_SEARCH_PATH should be moved
outside of #ifdef HAVE_THREAD_DB_H.
This is based on a patch attached to the PR, however, it needed a
tweak, as it was it broke the HAVE_THREAD_DB_H path.
2013-04-16 Will Newton <will.newton@gmail.com>
Pedro Alves <palves@redhat.com>
PR build/11881
* common/gdb_thread_db.h (LIBTHREAD_DB_SO)
(LIBTHREAD_DB_SEARCH_PATH): Move outside of #ifdef
HAVE_THREAD_DB_H.
Tom Tromey [Tue, 16 Apr 2013 15:44:32 +0000 (15:44 +0000)]
* gdb.texinfo (Set Catchpoints): Mention earliest version of
GCC that has the SDT probe points.
Nick Clifton [Tue, 16 Apr 2013 14:50:20 +0000 (14:50 +0000)]
* Makefile.am (emmo.c): Add a dependency upon scripttempl/DWARF.sc.
Pedro Alves [Tue, 16 Apr 2013 14:36:53 +0000 (14:36 +0000)]
NEWS: Mention "set foo unlimited".
Mention "set foo unlimited" in NEWS, right below the "New options"
section.
2013-04-16 Pedro Alves <palves@redhat.com>
Eli Zaretskii <eliz@gnu.org>
* NEWS: Mention "set foo unlimited".
gdbadmin [Tue, 16 Apr 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Tue, 16 Apr 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Doug Evans [Mon, 15 Apr 2013 23:53:38 +0000 (23:53 +0000)]
* dwarf2read.c (struct dwo_file): Replace member "cus" with "cu".
(struct create_dwo_cu_data): Renamed from create_dwo_info_table_data.
(create_dwo_cu_reader): Renamed from
create_dwo_debug_info_hash_table_reader.
(create_dwo_cu): Renamed from create_dwo_debug_info_hash_table.
Remove support for multiple CUs in a DWO file.
(open_and_init_dwo_file, lookup_dwo_cutu): Update.
Doug Evans [Mon, 15 Apr 2013 22:14:40 +0000 (22:14 +0000)]
* dwarf2read.c (create_debug_types_hash_table): Use hex_string
instead of phex.
(lookup_dwo_unit, create_dwo_debug_info_hash_table_reader): Ditto.
(create_dwo_in_dwp): Ditto.
H.J. Lu [Mon, 15 Apr 2013 21:16:18 +0000 (21:16 +0000)]
Check regular reference without non-GOT reference
non_got_ref may not be set when building shared library. We need to set
non_got_ref if there are any non-PIC relocations. But we only did this
when there were no PLT/GOT relocations. It failed when there is a PLT
relocation. This checkin moves the non_got_ref check out.
bfd/
2013-04-15 H.J. Lu <hongjiu.lu@intel.com>
PR ld/15371
* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Check
regular reference without non-GOT reference when building
shared library.
ld/testsuite/
2013-04-15 H.J. Lu <hongjiu.lu@intel.com>
PR ld/15371
* ld-ifunc/ifunc-20-i386.d: New file.
* ld-ifunc/ifunc-20-x86-64.d: Likewise.
* ld-ifunc/ifunc-20.s: Likewise.
diff --git a/bfd/elf-ifunc.c b/bfd/elf-ifunc.c
index
e56427d..
7e7ec36 100644
--- a/bfd/elf-ifunc.c
+++ b/bfd/elf-ifunc.c
@@ -187,23 +187,20 @@ _bfd_elf_allocate_ifunc_dyn_relocs (struct bfd_link_info *info,
htab = elf_hash_table (info);
+ /* When building shared library, we need to handle the case where it is
+ marked with regular reference, but not non-GOT reference since the
+ non-GOT reference bit may not be set here. */
+ if (info->shared && !h->non_got_ref && h->ref_regular)
+ for (p = *head; p != NULL; p = p->next)
+ if (p->count)
+ {
+ h->non_got_ref = 1;
+ goto keep;
+ }
+
/* Support garbage collection against STT_GNU_IFUNC symbols. */
if (h->plt.refcount <= 0 && h->got.refcount <= 0)
{
- /* When building shared library, we need to handle the case
- where it is marked with regular reference, but not non-GOT
- reference. It may happen if we didn't see STT_GNU_IFUNC
- symbol at the time when checking relocations. */
- if (info->shared
- && !h->non_got_ref
- && h->ref_regular)
- for (p = *head; p != NULL; p = p->next)
- if (p->count)
- {
- h->non_got_ref = 1;
- goto keep;
- }
-
h->got = htab->init_got_offset;
h->plt = htab->init_plt_offset;
*head = NULL;
diff --git a/ld/testsuite/ld-ifunc/ifunc-20-i386.d b/ld/testsuite/ld-ifunc/ifunc-20-i386.d
new file mode 100644
index
0000000..
9373fcf
--- /dev/null
+++ b/ld/testsuite/ld-ifunc/ifunc-20-i386.d
@@ -0,0 +1,13 @@
+#source: ifunc-20.s
+#ld: -shared -m elf_i386 -z nocombreloc
+#as: --32
+#readelf: -r --wide
+#target: x86_64-*-* i?86-*-*
+
+Relocation section '.rel.ifunc' at offset 0x[0-9a-f]+ contains 1 entries:
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_32[ ]+ifunc\(\)[ ]+ifunc
+
+Relocation section '.rel.plt' at offset 0x[0-9a-f]+ contains 1 entries:
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_JUMP_SLOT[ ]+ifunc\(\)[ ]+ifunc
diff --git a/ld/testsuite/ld-ifunc/ifunc-20-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-20-x86-64.d
new file mode 100644
index
0000000..
39492d4
--- /dev/null
+++ b/ld/testsuite/ld-ifunc/ifunc-20-x86-64.d
@@ -0,0 +1,13 @@
+#source: ifunc-20.s
+#ld: -shared -m elf_x86_64 -z nocombreloc
+#as: --64
+#readelf: -r --wide
+#target: x86_64-*-*
+
+Relocation section '.rela.ifunc' at offset 0x[0-9a-f]+ contains 1 entries:
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_X86_64_64[ ]+ifunc\(\)[ ]+ifunc \+ 0
+
+Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 1 entries:
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_X86_64_JUMP_SLOT[ ]+ifunc\(\)[ ]+ifunc \+ 0
diff --git a/ld/testsuite/ld-ifunc/ifunc-20.s b/ld/testsuite/ld-ifunc/ifunc-20.s
new file mode 100644
index
0000000..
9d45455
--- /dev/null
+++ b/ld/testsuite/ld-ifunc/ifunc-20.s
@@ -0,0 +1,16 @@
+ .section .data.rel,"aw",@progbits
+ .globl ifunc_ptrt
+ .type ifunc_ptr, @object
+ifunc_ptr:
+ .dc.a ifunc
+ .text
+ .type ifunc, @gnu_indirect_function
+ .globl ifunc
+ifunc:
+ ret
+ .size ifunc, .-ifunc
+ .type bar, @function
+ .globl bar
+bar:
+ call ifunc@PLT
+ .size bar, .-bar
Siva Chandra Reddy [Mon, 15 Apr 2013 20:37:37 +0000 (20:37 +0000)]
2013-04-15 Siva Chandra Reddy <sivachandra@google.com>
Add option to link testcases with Pthreads library when
using 'prepare_for_testing' in tests.
testsuite/
* lib/gdb.exp (build_executable_from_specs): Use
gdb_compile_pthreads to compile if option "pthreads" is
specified.
Tom Tromey [Mon, 15 Apr 2013 18:24:48 +0000 (18:24 +0000)]
* NEWS: Move recent entries into "since 7.6" section.
Tom Tromey [Mon, 15 Apr 2013 18:13:01 +0000 (18:13 +0000)]
PR c++/13588:
* NEWS: Update.
* break-catch-throw.c (struct exception_catchpoint)
<exception_rx, pattern>: New fields.
(fetch_probe_arguments, dtor_exception_catchpoint)
(check_status_exception_catchpoint)
(print_one_detail_exception_catchpoint): New functions.
(handle_gnu_v3_exceptions): Add "except_rx" argument.
Compile regular expression if needed.
(extract_exception_regexp): New function.
(catch_exception_command_1): Use extract_exception_regexp.
(compute_exception): Use fetch_probe_arguments.
(initialize_throw_catchpoint_ops): Set dtor, print_one_detail,
and check_status fields.
* cp-abi.c (cplus_typename_from_type_info): New function.
* cp-abi.h (cplus_typename_from_type_info): Declare.
(struct cp_abi_ops) <get_typename_from_type_info>: New field.
* gdb_regex.h (compile_rx_or_error): Declare.
* gnu-v3-abi.c (gnuv3_get_typename_from_type_info): Update
comment.
(init_gnuv3_ops): Set get_type_from_type_info field.
* probe.c (compile_rx_or_error): Move...
* utils.c (compile_rx_or_error): ... here.
gdb/doc
* gdb.texinfo (Set Catchpoints): Document regexp syntax for
exception catchpoints.
gdb/testsuite
* gdb.cp/exceptprint.exp: Add regexp catchpoint tests.
Tom Tromey [Mon, 15 Apr 2013 18:09:02 +0000 (18:09 +0000)]
PR c++/15176:
* NEWS: Update.
* break-catch-throw.c (compute_exception): New function.
(exception_funcs): New global.
(_initialize_break_catch_throw): Create $_exception.
* cp-abi.c (cplus_type_from_type_info): New function.
* cp-abi.h (cplus_type_from_type_info): Declare.
(struct cp_abi_ops) <get_type_from_type_info>: New field.
* gnu-v3-abi.c (gnuv3_get_typename_from_type_info)
(gnuv3_get_type_from_type_info): New functions.
(init_gnuv3_ops): Set get_type_from_type_info ABI field.
gdb/doc
* gdb.texinfo (Set Catchpoints): Document $_exception.
(Convenience Vars): Mention $_exception.
gdb/testsuite
* gdb.base/default.exp: Update for $_exception.
* gdb.cp/exceptprint.cc: New file.
* gdb.cp/exceptprint.exp: New file.
* lib/gdb.exp (skip_libstdcxx_probe_tests): New proc.
Tom Tromey [Mon, 15 Apr 2013 18:06:42 +0000 (18:06 +0000)]
* break-catch-throw.c (struct exception_names): New.
(exception_functions): Change type.
(re_set_exception_catchpoint): Look for SDT probes.
Tom Tromey [Mon, 15 Apr 2013 18:05:48 +0000 (18:05 +0000)]
PR c++/10119:
* break-catch-throw.c (exception_functions): New global.
(gnu_v3_exception_catchpoint_ops): Move earlier.
(struct exception_catchpoint): New.
(classify_exception_breakpoint): Rewrite.
(re_set_exception_catchpoint): New function.
(handle_gnu_v3_exceptions): Return void. Use init_catchpoint.
Allocate a struct exception_catchpoint.
(catch_exception_command_1): Update.
(initialize_throw_catchpoint_ops): Set 're_set' method.
Tom Tromey [Mon, 15 Apr 2013 18:04:53 +0000 (18:04 +0000)]
* Makefile.in (SFILES): Add break-catch-throw.c
(COMMON_OBS): Add break-catch-throw.o.
* break-catch-throw.c: New file.
* breakpoint.c: Move exception-catching code to new file.
(ep_parse_optional_if_clause): No longer static.
* breakpoint.h (ep_parse_optional_if_clause): Declare.
Tom Tromey [Mon, 15 Apr 2013 17:36:14 +0000 (17:36 +0000)]
PR c++/9065:
* NEWS: Update.
* breakpoint.c (watchpoint_exp_is_const): Add OP_TYPEID.
* c-exp.y (TYPEID): New token.
(exp): Add new TYPEID productions.
(ident_tokens): Add "typeid".
* cp-abi.c (cplus_typeid, cplus_typeid_type): New functions.
* cp-abi.h (cplus_typeid, cplus_typeid_type): Declare.
(struct cp_abi_ops) <get_typeid, get_typeid_type>: New fields.
* eval.c (evaluate_subexp_standard) <OP_TYPEID>: New case.
* expprint.c (dump_subexp_body_standard) <OP_TYPEID>: New
case.
* gnu-v3-abi.c (std_type_info_gdbarch_data): New global.
(build_std_type_info_type, gnuv3_get_typeid_type)
(gnuv3_get_typeid): New functions.
(init_gnuv3_ops): Initialize std_type_info_gdbarch_data. Set
new fields on ABI object.
* parse.c (operator_length_standard) <OP_TYPEID>: New case.
* std-operator.def (OP_TYPEID): New.
gdb/testsuite
* gdb.cp/typeid.cc: New file.
* gdb.cp/typeid.exp: New file.
Tom Tromey [Mon, 15 Apr 2013 17:31:17 +0000 (17:31 +0000)]
* elfread.c (elf_symtab_read): Install versioned symbol under
unversioned name as well.
Tom Tromey [Mon, 15 Apr 2013 17:30:36 +0000 (17:30 +0000)]
PR c++/11990:
* c-lang.c (cplus_language_defn): Use gdb_demangle.
* c-typeprint.c (c_type_print_base): Use gdb_demangle.
* cp-support.c (mangled_name_to_comp): Use gdb_demangle.
(gdb_demangle): New function.
* cp-support.h (gdb_demangle): Declare.
* dwarf2read.c (dwarf2_physname, fixup_partial_die)
(dwarf2_name): Use gdb_demangle.
* gdbtypes.c (check_stub_method): Use gdb_demangle.
* gnu-v3-abi.c (gnuv3_rtti_type): Strip @plt and version
suffixes from name.
(gnuv3_print_method_ptr): Use gdb_demangle.
* jv-lang.c (java_demangle): Use gdb_demangle.
* jv-typeprint.c (java_type_print_base): Use gdb_demangle.
* language.c (unk_lang_demangle): Use gdb_demangle.
* symtab.c (symbol_find_demangled_name)
(demangle_for_lookup): Use gdb_demangle.
Tom Tromey [Mon, 15 Apr 2013 17:27:44 +0000 (17:27 +0000)]
PR c++/12824:
* NEWS: Update.
* breakpoint.c (enum exception_event_kind) <EX_EVENT_RETHROW>:
New constant.
(classify_exception_breakpoint): New function.
(print_it_exception_catchpoint, print_one_exception_catchpoint)
(print_mention_exception_catchpoint)
(print_recreate_exception_catchpoint, handle_gnu_v3_exceptions)
(catch_exception_command_1): Handle "rethrow" catchpoint.
(catch_rethrow_command): New function.
(_initialize_breakpoint): Add "catch rethrow" command.
gdb/doc
* gdb.texinfo (Set Catchpoints): Reorganize exception
catchpoints. Document "catch rethrow".
(Debugging C Plus Plus): Mention "catch rethrow".
gdb/testsuite
* gdb.cp/exception.exp: Add "catch rethrow" tests.
Tom Tromey [Mon, 15 Apr 2013 17:20:39 +0000 (17:20 +0000)]
* gdb.texinfo (Set Catchpoints): Remove obsolete text.
Cary Coutant [Mon, 15 Apr 2013 16:40:59 +0000 (16:40 +0000)]
gold/
* layout.cc (Layout::set_relocatable_section_offsets): Don't
allocate space in file for BSS sections.
Cary Coutant [Mon, 15 Apr 2013 16:37:30 +0000 (16:37 +0000)]
gold/
* script-sections.cc (Orphan_output_section): Reset address
to zero after each orphaned section for relocatable links.
Cary Coutant [Mon, 15 Apr 2013 16:34:12 +0000 (16:34 +0000)]
gold/
* symtab.cc (Symbol_table::sized_write_globals): Subtract
section starting address for relocatable link.
* testsuite/Makefile.am (script_test_11): New test.
* testsuite/Makefile.in: Regenerate.
* testsuite/script_test_11.c: New source file.
* testsuite/script_test_11.t: New linker script.
Pierre Muller [Mon, 15 Apr 2013 14:23:54 +0000 (14:23 +0000)]
* contrib/ari/gdb_ari.sh (write_pc rule): Do not consider
set_gdbarch_write_pc as deprecated anymore.
Joel Brobecker [Mon, 15 Apr 2013 13:04:05 +0000 (13:04 +0000)]
Add missing empty line in spu_write_pc.
gdb/ChangeLog:
* spu-tdep.c (spu_write_pc): Add empty line after local variable
declarations.
Nick Clifton [Mon, 15 Apr 2013 12:04:48 +0000 (12:04 +0000)]
* Makefile.am (ELF_DEPS): Add a dependency upon
scripttempl/DWARF.sc.
(ELF_GEN_DEPS): Likewise.
* Makefile.in: Regenerate.
Julian Brown [Mon, 15 Apr 2013 10:30:23 +0000 (10:30 +0000)]
gas/
* expr.c (add_to_result, subtract_from_result): Make global.
* expr.h (add_to_result, subtract_from_result): Add prototypes.
* config/tc-sh.c (sh_optimize_expr): Use add_to_result,
subtract_from_result to handle extra bit of precision for .sleb128
directive operands.
gas/testsuite/
* gas/all/gas.exp (sleb128-7): Don't run for tic4x, tic54x.
* gas/all/sleb128-2.s: Reformat, use _ at start of labels, remove
cruft.
* gas/all/sleb128-3.s: Likewise.
* gas/all/sleb128-4.s: Likewise.
* gas/all/sleb128-5.s: Likewise.
* gas/all/sleb128-7.s: Likewise.
* gas/all/sleb128-2.d: Handle data sections named $DATA$.
* gas/all/sleb128-3.d: Likewise.
* gas/all/sleb128-4.d: Likewise.
* gas/all/sleb128-5.d: Likewise.
* gas/all/sleb128-7.d: Likewise.
Nick Clifton [Mon, 15 Apr 2013 08:51:58 +0000 (08:51 +0000)]
* scripttempl/armbpabi.sc: Replace DWARF sections with an
inclusion of DWARF.sc.
* scripttempl/avr.sc: Likewise.
* scripttempl/elf.sc: Likewise.
* scripttempl/elf32cr16.sc: Likewise.
* scripttempl/elf32crx.sc: Likewise.
* scripttempl/elf32msp430.sc: Likewise.
* scripttempl/elf32msp430_3.sc: Likewise.
* scripttempl/elf32sh-symbian.sc: Likewise.
* scripttempl/elf64hppa.sc: Likewise.
* scripttempl/elf_chaos.sc: Likewise.
* scripttempl/elfd10v.sc: Likewise.
* scripttempl/elfd30v.sc: Likewise.
* scripttempl/elfi370.sc: Likewise.
* scripttempl/elfm68hc11.sc: Likewise.
* scripttempl/elfm68hc12.sc: Likewise.
* scripttempl/elfxgate.sc: Likewise.
* scripttempl/elfxtensa.sc: Likewise.
* scripttempl/epiphany_4x4.sc: Likewise.
* scripttempl/i386beos.sc: Likewise.
* scripttempl/i386go32.sc: Likewise.
* scripttempl/ia64vms.sc: Likewise.
* scripttempl/ip2k.sc: Likewise.
* scripttempl/iq2000.sc: Likewise.
* scripttempl/mep.sc: Likewise.
* scripttempl/mmo.sc: Likewise.
* scripttempl/v850.sc: Likewise.
* scripttempl/v850_rh850.sc: Likewise.
* scripttempl/xstormy16.sc: Likewise.
* scripttempl/DWARF.sc: New.
Alan Modra [Mon, 15 Apr 2013 03:31:29 +0000 (03:31 +0000)]
* Makefile.am ($(MKDOC)): Append $(EXEEXT_FOR_BUILD) to temp file.
* Makefile.in: Regenerate.
Alan Modra [Mon, 15 Apr 2013 03:13:20 +0000 (03:13 +0000)]
* archive.c (_bfd_archive_close_and_cleanup): Clear parent
cache slot for archives.
Alan Modra [Mon, 15 Apr 2013 00:00:05 +0000 (00:00 +0000)]
daily update
gdbadmin [Mon, 15 Apr 2013 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***
Hans-Peter Nilsson [Sun, 14 Apr 2013 14:53:01 +0000 (14:53 +0000)]
* mmo.c (mmo_write_chunk): Break out abfd->tdata.mmo_data to new
local variable mmop.
gdbadmin [Sun, 14 Apr 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Sun, 14 Apr 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Yao Qi [Sat, 13 Apr 2013 14:14:08 +0000 (14:14 +0000)]
gdb/
* ctf.c (_initialize_ctf): Include "completer.h".
Call add_target_with_completer instead of add_target.
gdb/testsuite/
* gdb.base/completion.exp: Test completion of command
'target ctf' if target ctf is supported.
Alan Modra [Sat, 13 Apr 2013 10:12:30 +0000 (10:12 +0000)]
* powerpc.cc (Stub_control::can_add_to_stub_group): Don't set
owner when sections are not adjacent and exceed group size.
(Target_powerpc::group_sections): Handle corner case.
(Target_powerpc::Branch_info::make_stub): Handle case where
stub table doesn't exist due to branches in non-exec sections.
(Target_powerpc::Relocate::relocate): Likewise.
Alan Modra [Sat, 13 Apr 2013 00:00:04 +0000 (00:00 +0000)]
daily update
gdbadmin [Sat, 13 Apr 2013 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***
Jan Kratochvil [Fri, 12 Apr 2013 20:45:31 +0000 (20:45 +0000)]
gdb/doc/
* gdb.texinfo (Auto-loading safe path): Add quick -iex using command
line below the sample output.
Doug Evans [Fri, 12 Apr 2013 17:14:22 +0000 (17:14 +0000)]
Re: "show configuration"/--configuration patch: mention --configuration too.
Doug Evans [Fri, 12 Apr 2013 17:12:28 +0000 (17:12 +0000)]
Clean up "show configuration" entry.
Jan Kratochvil [Fri, 12 Apr 2013 16:04:07 +0000 (16:04 +0000)]
gdb/
Fix GDB regression related to PR binutils/14813.
* jit.c (mem_bfd_iovec_close): Return 0 for success.
* minidebug.c (lzma_close): Add return value comment.
* remote.c (remote_bfd_iovec_close): Return 0 for success.
* solib-spu.c (spu_bfd_iovec_close): Likewise.
* spu-linux-nat.c (spu_bfd_iovec_close): Likewise.
Jan Kratochvil [Fri, 12 Apr 2013 16:02:29 +0000 (16:02 +0000)]
gdb/
* config.in: Regenerate.
Tom Tromey [Fri, 12 Apr 2013 14:55:28 +0000 (14:55 +0000)]
* dwarf2-frame.c (struct comp_unit) <dwarf_frame_buffer>: Now
const.
* dwarf2read.c (struct dwarf2_section_info) <buffer>: Now const.
(struct die_reader_specs) <buffer>: Likewise.
(die_reader_func_ftype): Make 'info_ptr' const.
(struct line_header) <include_dirs, statement_program_start,
statement_program_end>: Now const.
(struct file_entry) <name>: Likewise.
(struct partial_die_info) <sibling>: Likewise.
(struct dwarf_block) <data>: Likewise.
(dwarf2_read_section): Remove cast.
(dwarf2_get_section_info): Make 'bufp' const.
(read_index_from_section): Constify.
(dw2_get_file_names_reader): Make 'info_ptr' const.
(dw2_get_primary_filename_reader): Likewise.
(read_comp_unit_head): Make 'info_ptr' and return type const.
(read_and_check_comp_unit_head, read_and_check_type_unit_head):
Likewise.
(read_abbrev_offset): Constify.
(dwarf2_create_include_psymtab): Make 'name' const.
(create_debug_types_hash_table): Update.
(read_cutu_die_from_dwo): Make 'result_info_ptr' const.
(init_cutu_and_read_dies, init_cutu_and_read_dies_no_follow):
Constify.
(process_psymtab_comp_unit_reader, build_type_psymtabs_reader)
(load_partial_comp_unit_reader): Make 'info_ptr' const.
(read_comp_units_from_section): Constify.
(peek_abbrev_code, peek_die_abbrev, skip_children, skip_one_die)
(locate_pdi_sibling, load_full_comp_unit_reader): Make 'info_ptr'
const.
(dwarf2_compute_name, setup_type_unit_groups): Constify.
(create_dwo_debug_info_hash_table): Make 'info_ptr' const.
(create_dwp_hash_table, dwarf2_ranges_read)
(dwarf2_record_block_ranges): Constify.
(read_die_and_children, read_die_and_siblings_1)
(read_die_and_siblings): Make 'info_ptr' and 'new_info_ptr'
const.
(read_full_die_1, read_full_die): Make 'info_ptr' const.
(abbrev_table_read_table): Constify.
(load_partial_dies): Make 'info_ptr' const.
(read_partial_die, read_attribute_value, read_attribute): Make
'info_ptr' and return type const.
(read_address, read_initial_length)
(read_checked_initial_length_and_offset, read_offset)
(read_offset_1, read_n_bytes, read_direct_string): Make 'buf'
const.
(read_direct_string): Make 'buf' and return type const.
(read_indirect_string_at_offset, read_indirect_string_from_dwz)
(read_indirect_string): Make return type const.
(read_unsigned_leb128, read_signed_leb128): Make 'buf' const.
(read_addr_index_from_leb128, dwarf2_read_addr_index_reader): Make
'info_ptr' const.
(read_str_index): Make return type const.
(add_include_dir): Make 'include_dir' const.
(add_file_name): Make 'name' const.
(dwarf_decode_line_header): Constify.
(psymtab_include_file_name): Make return type const.
(dwarf_decode_lines_1, dwarf_decode_lines): Constify.
(dwarf2_start_subfile): Make 'filename' const.
(dwarf2_const_value_attr): Make 'bytes' const.
(read_signatured_type_reader): Make 'info_ptr' const.
(decode_locdesc): Constify.
(skip_form_bytes): Make 'bytes', 'buffer_end', and return type
const.
(skip_unknown_opcode): Make 'opcode_definitions', 'mac_ptr',
'mac_end', and return type const.
(dwarf_parse_macro_header): Make 'mac_ptr' and return type const.
(dwarf_decode_macro_bytes): Make 'mac_ptr', 'mac_end', and return
type const.
(per_cu_header_read_in): Constify.
* symfile.h (dwarf2_get_section_info): Update.
Tom Tromey [Fri, 12 Apr 2013 14:49:25 +0000 (14:49 +0000)]
* symtab.h (struct general_symbol_info) <value.bytes>: Make const.
Eli Zaretskii [Fri, 12 Apr 2013 08:57:43 +0000 (08:57 +0000)]
NEWS: Document 'show configuration'.
Eli Zaretskii [Fri, 12 Apr 2013 08:57:07 +0000 (08:57 +0000)]
Implement a new command to show GDB build-time configuration parameters.
* top.c (print_gdb_configuration): New function, displays the
details about GDB configure-time parameters.
(print_gdb_version): Mention "show configuration".
* cli/cli-cmds.c (show_configuration): New function.
(_initialize_cli_cmds): Add the "show configuration" command.
* main.c (captured_main) <print_configuration>: New static var.
<long_options>: Use it.
If --configuration was given, call print_gdb_configuration.
* doc/gdb.texinfo (Mode Options): Document '-configuration'.
(Help): Document "show configuration".
(Bug Reporting): Add requirements to include the configuration
details in bug reports.
gdbadmin [Fri, 12 Apr 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Fri, 12 Apr 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Jan Kratochvil [Thu, 11 Apr 2013 16:53:01 +0000 (16:53 +0000)]
gdb/
Fix parsing tabs in ${gdb_target_obs}.
* configure.tgt (gdb_have_gcore): Replace case with for and if.
Jan Kratochvil [Thu, 11 Apr 2013 14:13:44 +0000 (14:13 +0000)]
gdb/
* Makefile.in (HAVE_NATIVE_GCORE_TARGET): New.
(generated_files): Add gcore.
(install-only, uninstall): Add gcore if HAVE_NATIVE_GCORE_TARGET or
HAVE_NATIVE_GCORE_HOST.
(gcore): New.
* NEWS (Changes since GDB 7.6): Mention newly installed gcore.
* config/alpha/alpha-osf3.mh, config/i386/fbsd.mh,
config/i386/fbsd64.mh, config/i386/i386gnu.mh, config/i386/i386sol2.mh,
config/i386/sol2-64.mh, config/mips/irix5.mh, config/mips/irix6.mh,
config/powerpc/fbsd.mh, config/sparc/fbsd.mh, config/sparc/sol2.mh:
Add HAVE_NATIVE_GCORE_HOST.
* configure: Regenerate.
* configure.ac (HAVE_NATIVE_GCORE_TARGET): New, set it, AC_SUBST it.
New AC_SUBST fir GDB_TRANSFORM_NAME and GCORE_TRANSFORM_NAME. New
AC_CONFIG_FILES for gcore.
* configure.tgt: Add gdb_have_gcore to the initial comment. Set
gdb_have_gcore.
* gdb_gcore.sh: Rename to ...
* gcore.in: ... here. Remove gcore.sh comment. Use GDB_TRANSFORM_NAME
and GCORE_TRANSFORM_NAME substitutions.
gdb/doc/
* Makefile.in (MAN1S): Add gcore.1.
Remove "Host, target, and site specific Makefile fragments" comment.
(@host_makefile_frag@, HAVE_NATIVE_GCORE_TARGET): New.
(install-man1, uninstall-man1): Conditionalize gcore.1.
(gcore.1): New.
* gdb.texinfo (Man Pages): Add gcore man.
(gcore man): New node.
Jan Kratochvil [Thu, 11 Apr 2013 13:14:04 +0000 (13:14 +0000)]
gdb/
* remote.c (unpush_and_perror): Add output message final dot.
Julian Brown [Thu, 11 Apr 2013 10:54:13 +0000 (10:54 +0000)]
gas/
* read.c (convert_to_bignum): Add sign parameter. Use it
instead of X_unsigned to determine sign of resulting bignum.
(emit_expr): Pass extra argument to convert_to_bignum.
(emit_leb128_expr): Use X_extrabit instead of X_unsigned. Pass
X_extrabit to convert_to_bignum.
(parse_bitfield_cons): Set X_extrabit.
* expr.c (make_expr_symbol, expr_build_uconstant, operand):
Initialise X_extrabit field as appropriate.
(add_to_result): New.
(subtract_from_result): New.
(expr): Use above.
* expr.h (expressionS): Add X_extrabit field.
gas/testsuite/
* gas/all/sleb128-2.s: New test.
* gas/all/sleb128-3.s: Likewise.
* gas/all/sleb128-4.s: Likewise.
* gas/all/sleb128-5.s: Likewise.
* gas/all/sleb128-7.s: Likewise.
* gas/all/sleb128-2.d: New.
* gas/all/sleb128-3.d: New.
* gas/all/sleb123-4.d: New.
* gas/all/sleb123-5.d: New.
* gas/all/sleb123-7.d: New.
* gas/all/gas.exp (sleb128-2, sleb128-3, sleb128-4, sleb128-5)
(sleb128-7): Run new tests.
Yao Qi [Thu, 11 Apr 2013 05:05:49 +0000 (05:05 +0000)]
gdb/
* tracepoint.c (tfile_interp_line): Fit parameters line and
utpp in one line.
Alan Modra [Thu, 11 Apr 2013 01:28:27 +0000 (01:28 +0000)]
PR gold/15354
* powerpc.cc (Target_powerpc::make_brlt_section): Name section
.branch_lt to match bfd ld. Adjust comments throughout file.
Joel Brobecker [Thu, 11 Apr 2013 01:18:49 +0000 (01:18 +0000)]
Do not overwrite so_list's so_name in solib_map_sections
gdb/ChangeLog:
* solib.c (solib_map_sections): Remove code overwriting
SO->SO_NAME with the bfd's filename.
gdbadmin [Thu, 11 Apr 2013 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Thu, 11 Apr 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Jan Kratochvil [Wed, 10 Apr 2013 19:16:45 +0000 (19:16 +0000)]
opcodes/
* rl78-dis.c (print_insn_rl78): Use alternative form as a GCC false
warning workaround.