Pedro Alves [Mon, 5 May 2008 16:41:42 +0000 (16:41 +0000)]
* infcmd.c (step_1): Put thread id on the stack to avoid possible
NULL dereferencing.
Luis Machado [Mon, 5 May 2008 16:13:49 +0000 (16:13 +0000)]
* symfile.c (reread_symbols): Update objfile's entry point.
Aleksandar Ristovski [Mon, 5 May 2008 14:47:09 +0000 (14:47 +0000)]
Minor typing error fixes in ChangeLog.
Aleksandar Ristovski [Mon, 5 May 2008 14:37:32 +0000 (14:37 +0000)]
* ada-lang.c: Update throughout to use symbol_matches_domain
instead of matching the symbol domain explictly.
* dwarf2read.c (add_partial_symbol): Do not add new psym for
STRUCT_DOMAIN. Make sure you recognize c++ struct and java and ada
class as typedefs. See lookup_partial_symbol function.
(new_symbol): Similar to add_partial_symbol, do not create
symbol for the typedef. See lookup_block_symbol.
* symtab.c (symbol_matches_domain): New function, takes care
of dual meaning of STRUCT_DOMAIN symbol for c++, ada and java.
(lookup_partial_symbol): Use symbol_matches_domain to see if the
found psym domain matches the given domain.
(lookup_block_symbol): Likewise.
M R Swami Reddy [Mon, 5 May 2008 10:25:20 +0000 (10:25 +0000)]
Added 3 miscellaneous testcases like read32.ms uread16.ms hw-trap.ms.
M R Swami Reddy [Mon, 5 May 2008 10:00:16 +0000 (10:00 +0000)]
These files removed.
M R Swami Reddy [Mon, 5 May 2008 09:55:36 +0000 (09:55 +0000)]
Add the change for testcases comment update and new testcases addition.
M R Swami Reddy [Mon, 5 May 2008 09:52:46 +0000 (09:52 +0000)]
Update testcase comment.
addb.cgs addd.cgs addi.cgs andb.cgs andd.cgs andw.cgs
ashub.cgs ashub_i.cgs ashud.cgs ashud_i.cgs ashuw.cgs
ashuw_i.cgs cmpi.cgs cmpw.cgs jlt.cgs jump.cgs loadd.cgs
loadw.cgs lshb.cgs lshb_i.cgs lshd.cgs lshd_i.cgs lshw.cgs
lshw_i.cgs movb.cgs movd.cgs movw.cgs movxb.cgs movxw.cgs
movzb.cgs movzw.cgs mulb.cgs muluw.cgs mulw.cgs orb.cgs
ord.cgs orw.cgs pop1.cgs pop2.cgs pop3.cgs popret1.cgs
popret2.cgs popret3.cgs push1.cgs push2.cgs push3.cgs
Added BIT operation testcases:
cbitb.cgs cbitw.cgs sbitb.cgs sbitw.cgs tbitb.cgs tbit.cgs and tbitw.cgs
Vladimir Prus [Mon, 5 May 2008 09:47:47 +0000 (09:47 +0000)]
* top.c (command_line_handler_continuation): Remove.
(execute_command): Do not install the above.
M R Swami Reddy [Mon, 5 May 2008 09:41:33 +0000 (09:41 +0000)]
Comment change
M R Swami Reddy [Mon, 5 May 2008 09:35:16 +0000 (09:35 +0000)]
Updated the sim engine's ecode logic and commit the code changes
M R Swami Reddy [Mon, 5 May 2008 09:33:37 +0000 (09:33 +0000)]
Update for code standards
M R Swami Reddy [Mon, 5 May 2008 09:29:10 +0000 (09:29 +0000)]
Cleaned up unwanted code and fixed BIT operations simulation.
M R Swami Reddy [Mon, 5 May 2008 09:24:26 +0000 (09:24 +0000)]
Update simops struct members and PSR bits.
M R Swami Reddy [Mon, 5 May 2008 09:21:46 +0000 (09:21 +0000)]
Fix typo.
M R Swami Reddy [Mon, 5 May 2008 09:19:42 +0000 (09:19 +0000)]
Update the machine code decode algorithm using hash table.
Vladimir Prus [Mon, 5 May 2008 09:02:59 +0000 (09:02 +0000)]
* inf-loop.c (inferior_event_handler): Call bpstat_do_action,
and catch all exceptions from it.
* top.c (command_line_handler_continuation): Don't
call bpstat_do_action here.
Alan Modra [Mon, 5 May 2008 01:43:55 +0000 (01:43 +0000)]
PR 6473
* ld-elf/lma.s, ld-elf/lma.lnk: New test.
* ld-elf/binutils.exp: Run it.
gdbadmin [Mon, 5 May 2008 00:00:36 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Mon, 5 May 2008 00:00:06 +0000 (00:00 +0000)]
daily update
Daniel Jacobowitz [Sun, 4 May 2008 22:49:47 +0000 (22:49 +0000)]
* dwarf2read.c (struct dwarf2_cu): Add type_hash.
(struct die_info): Remove type.
(read_type_die, read_typedef, read_base_type, read_subrange_type)
(read_structure_type, read_enumeration_type, read_array_type)
(read_tag_pointer_type, read_tag_ptr_to_member_type)
(read_tag_reference_type, read_tag_const_type, read_tag_volatile_type)
(read_tag_string_type, read_subroutine_type, read_set_type)
(read_unspecified_type): Delete prototypes. Remove check for
already-loaded type. Return the new type.
(set_die_type): Return the new type.
(reset_die_and_siblings_types): Delete.
(load_comp_unit, load_full_comp_unit): Set type_hash.
(process_queue): Remove call to reset_die_and_siblings_types.
(process_die): Do not read most types here. Use read_type_die
for others.
(read_func_scope, dwarf2_add_member_fn): Use read_type_die.
(quirk_gcc_member_function_pointer): Return the new type.
(process_structure_scope, process_enumeration_scope): Use
get_die_type and read the DIE's type.
(read_full_die): Do not initialize die->type.
(tag_type_to_type): Use read_type_die.
(read_type_die): Check for already defined types. Return the
type.
(determine_prefix): Use get_die_type.
(set_die_type): Return the type.
(get_die_type): Take a CU argument. Check for no type_hash.
Daniel Jacobowitz [Sun, 4 May 2008 20:04:48 +0000 (20:04 +0000)]
* dwarf2read.c (dwarf2_ranges_read, read_partial_die): Initialize
locals.
Pedro Alves [Sun, 4 May 2008 19:43:31 +0000 (19:43 +0000)]
* gdb.base/longjmp.c, gdb.base/longjmp.exp: New files.
Pedro Alves [Sun, 4 May 2008 19:39:00 +0000 (19:39 +0000)]
gdb/
* breakpoint.c (update_breakpoints_after_exec): Delete bp_longjmp
and bp_longjmp_resume breakpoints.
(breakpoint_address_is_meaningful): Claim bp_longjmp_resume as
meaningful.
(create_longjmp_breakpoint): Don't create bp_longjmp_resume
breakpoints. Create bp_longjmp breakpoints as momentary
breakpoints.
(enable_longjmp_breakpoint): Delete.
(set_longjmp_breakpoint): New.
(disable_longjmp_breakpoint): Delete.
(delete_longjmp_breakpoint): New.
(set_longjmp_resume_breakpoint): Delete.
(set_momentary_breakpoint_at_pc): New.
(breakpoint_re_set_one): Don't delete bp_longjmp and
bp_longjmp_resume breakpoints.
(breakpoint_re_set): Don't create longjmp and longjmp-resume
breakpoints.
* infrun.c (step_resume_breakpoint): Add comment.
(struct execution_control_state): Delete handling_longjmp member.
(init_execution_control_state). Don't clear handling_longjmp.
(context_switch): Don't context switch handling_longjmp.
(handle_inferior_event): If handling a bp_longjmp breakpoint,
create a bp_longjmp_resume breakpoint, and set it as current
step_resume_breakpoint, then step over the longjmp breakpoint. If
handling a bp_longjmp_resume breakpoint, don't delete the longjmp
breakpoint, delete the longjmp-resume breakpoint, and stop
stepping.
(currently_stepping): Remove handling_longjmp from expression.
(insert_step_resume_breakpoint_at_sal): Update comment.
(insert_longjmp_resume_breakpoint): New.
* breakpoint.h (set_momentary_breakpoint_at_pc): Declare.
(enable_longjmp_breakpoint, disable_longjmp_breakpoint): Delete
declarations.
(set_longjmp_breakpoint, delete_longjmp_breakpoint): Declare.
(set_longjmp_resume_breakpoint): Delete declaration.
* gdbthread.h (save_infrun_state): Remove handling_longjmp
parameter.
(load_infrun_state): Delete *handling_longjmp parameter.
* thread.c (save_infrun_state): Remove handling_longjmp parameter.
Update body.
(load_infrun_state): Delete *handling_longjmp parameter. Update
body.
* infcmd.c (disable_longjmp_breakpoint_cleanup): Delete.
(delete_longjmp_breakpoint_cleanup): New.
(step_1): Call set_longjmp_breakpoint instead of
enable_longjmp_breakpoint. Use delete_longjmp_breakpoint_cleanup
instead of disable_longjmp_breakpoint_cleanup when making cleanup.
(step_1_continuation): Pass thread id in the continuation args to
step_once.
(step_once): Add thread parameter. Pass thread id the the
continuation.
gdb/testsuite/
* gdb.cp/annota2.exp: Adjust to breakpoints invalidations at
different times.
Jan Kratochvil [Sun, 4 May 2008 17:27:01 +0000 (17:27 +0000)]
gdb/
* Makefile.in: Update dependencies.
* dwarf2read.c: Include "addrmap.h"
(struct dwarf2_cu): New fields RANGES_OFFSET and HAS_RANGES_OFFSET.
(dwarf2_ranges_read): New prototype.
(dwarf2_build_psymtabs_hard): Initialize and prepare PSYMTABS_ADDRMAP.
Add discontiguous range to PSYMTABS_ADDRMAP by DWARF2_RANGES_READ on
HAS_RANGES_OFFSET, otherwise add there the contiguous range.
(dwarf2_ranges_read): New parameter RANGES_PST, update the function
comment for it. Add the found ranges to RANGES_PST. New variable
BASEADDR, initialize it the common way.
(dwarf2_get_pc_bounds): Update the caller for the new parameter.
(read_partial_die): `DW_AT_ranges' now only sets RANGES_OFFSET and
HAS_RANGES_OFFSET for the later processing.
* objfiles.h (struct objfile): New field PSYMTABS_ADDRMAP.
* symtab.c: Include "addrmap.h"
(find_pc_sect_psymtab): Support reading the field PSYMTABS_ADDRMAP.
Move the psymtab locator into ...
(find_pc_sect_psymtab_closer): ... a new function.
gdb/testsuite/
* gdb.dwarf2/dw2-ranges.S: Merge the secondary section with `.fini'.
* gdb.dwarf2/dw2-ranges.exp: Compile also `dw2-ranges2.S' and
`dw2-ranges3.S' and test also their MAIN2, FUNC2 and MAIN3 symbols.
* gdb.dwarf2/dw2-ranges2.S, gdb.dwarf2/dw2-ranges3.S: New files.
Jan Kratochvil [Sun, 4 May 2008 17:19:06 +0000 (17:19 +0000)]
Set CU BASE_ADDRESS already from partial DIEs.
* dwarf2read.c (read_partial_die): New variables BASE_ADDRESS and
BASE_ADDRESS_TYPE. Set these variables from DW_AT_LOW_PC and
DW_AT_ENTRY_PC. Set CU->HEADER.BASE_KNOWN and CU->HEADER.BASE_ADDRESS
from these variables if it was still unset.
Ulrich Weigand [Sun, 4 May 2008 15:21:05 +0000 (15:21 +0000)]
* arch-utils.c (gdbarch_update_p): Use default values for
info.abfd and info.target_desc if they are NULL.
(gdbarch_from_bfd): Remove assertion.
(set_gdbarch_from_file): Call gdbarch_find_by_info directly,
using the current target description.
(gdbarch_info_fill): Do not use default values for info->abfd
and info->target_desc.
Jan Kratochvil [Sun, 4 May 2008 14:34:06 +0000 (14:34 +0000)]
* symfile.c (reread_symbols): Reload EXEC_BFD on its change.
Ulrich Weigand [Sun, 4 May 2008 14:12:34 +0000 (14:12 +0000)]
* inferior.h (read_pc_pid, write_pc_pid): Remove.
* regcache.h (regcache_read_pc, regcache_write_pc): Add prototypes.
* regcache.c (read_pc_pid): Remove, replace by ...
(regcache_read_pc): ... this function.
(write_pc_pid): Remove, replace by ...
(regcache_write_pc): ... this function.
(read_pc, write_pc): Update.
* infrun.c (displaced_step_prepare): Replace read_pc_pid and
write_pc_pid by regcache_read_pc and regcache_write_pc.
(displaced_step_fixup): Likewise.
(resume): Likewise. Use regcache arch instead of current_gdbarch.
(prepare_to_proceed): Likewise.
(proceed): Likewise.
(adjust_pc_after_break): Likewise.
(handle_inferior_event): Likewise.
* linux-nat.c (cancel_breakpoint): Likewise.
* linux-thread-db.c (check_event): Likewise.
* aix-thread.c (aix_thread_wait): Likewise.
* tracepoint.c (trace_dump_command): Likewise.
Jan Kratochvil [Sun, 4 May 2008 12:44:16 +0000 (12:44 +0000)]
* dwarf2loc.c (dwarf_expr_frame_base): Error out on missing
SYMBOL_LOCATION_BATON.
Vladimir Prus [Sun, 4 May 2008 12:15:54 +0000 (12:15 +0000)]
* lib/mi-support.exp (mi_run_cmd): Allow for =thread-created
notification to appear.
Vladimir Prus [Sun, 4 May 2008 09:33:23 +0000 (09:33 +0000)]
Fix formatting
Vladimir Prus [Sun, 4 May 2008 09:30:53 +0000 (09:30 +0000)]
* gdb.texinfo (GDB/MI Output Records): Add
missing semicolon.
Vladimir Prus [Sun, 4 May 2008 09:28:27 +0000 (09:28 +0000)]
Fix auxv data parsing on 64-bit solaris
* target.h (struct target_ops): New field to_auxv_parse.
* auxv.c (default_auxv_parse): New, renamed from previous
target_auxv_parse.
(target_auxv_parse): Try to call target method. Fallback to
default_auxv_parse if not found.
* procfs.c (procfs_auxv_parse): New.
(init_procfs_ops): On Solaris, in 64-bit mode, install
procfs_auxv_parse.
Daniel Jacobowitz [Sun, 4 May 2008 04:04:11 +0000 (04:04 +0000)]
* gdb.base/fullname.c: New file.
* gdb.base/fullname.exp: New file.
* lib/gdb.exp (gdb_breakpoint): Support no-message option.
Adam Nemet [Sun, 4 May 2008 03:45:42 +0000 (03:45 +0000)]
* symfile.c (add_symbol_file_command): Use paddress rather than
hex_string to print the address.
Ulrich Weigand [Sun, 4 May 2008 00:41:44 +0000 (00:41 +0000)]
* rs6000-tdep.c (rs6000_frame_this_id): If info->base is 0,
return the null frame ID to terminate the backtrace.
Alan Modra [Sun, 4 May 2008 00:00:05 +0000 (00:00 +0000)]
daily update
gdbadmin [Sun, 4 May 2008 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***
Ulrich Weigand [Sat, 3 May 2008 23:50:43 +0000 (23:50 +0000)]
* rs6000-tdep.c: Do not include "rs6000-tdep.h".
(rs6000_find_toc_address_hook): Move to rs6000-aix-tdep.c.
(SIG_FRAME_PC_OFFSET): Likewise.
(SIG_FRAME_LR_OFFSET): Likewise.
(SIG_FRAME_FP_OFFSET): Likewise.
(rs6000_push_dummy_call): Likewise.
(rs6000_return_value): Likewise.
(rs6000_convert_from_func_ptr_addr): Likewise.
(branch_dest, rs6000_software_single_step): Likewise.
(deal_with_atomic_sequence): Rename to ...
(ppc_deal_with_atomic_sequence): ... this. Adapt all callers.
Do not call branch_dest; inline required parts of that function.
(rs6000_skip_trampoline_code): Replace DEPRECATED_SYMBOL_NAME
with SYMBOL_LINKAGE_NAME.
(struct reg, regsize): Delete.
(read_memory_addr): Delete; inline into callers.
(rs6000_skip_prologue): Move after skip_prologue.
(skip_prologue): Remove prototype.
(rs6000_gdbarch_init): Remove sysv_abi variable; perform all
initialization as if this variable were true. Do not install
ppc64_sysv_abi_adjust_breakpoint_address.
* rs6000-aix-tdep.c: Include "gdb_assert.h", "gdbtypes.h",
"gdbcore.h", "target.h", "value.h", "infcall.h", "objfiles.h",
and "breakpoint.h".
(rs6000_find_toc_address_hook): Move here from rs6000-tdep.c.
(SIG_FRAME_PC_OFFSET): Likewise.
(SIG_FRAME_LR_OFFSET): Likewise.
(SIG_FRAME_FP_OFFSET): Likewise.
(rs6000_push_dummy_call): Likewise.
(rs6000_return_value): Likewise.
(rs6000_convert_from_func_ptr_addr): Likewise.
(branch_dest, rs6000_software_single_step): Likewise. Replace
tdep->text_segment_base by AIX_TEXT_SEGMENT_BASE.
(rs6000_aix_init_osabi): Install rs6000_push_dummy_call,
rs6000_return_value, and rs6000_convert_from_func_ptr_addr.
Call set_gdbarch_long_double_bit and set_gdbarch_frame_red_zone_size.
Set tdep->lr_frame_offset. Do not set tdep->text_segment_base.
* rs6000-tdep.h (rs6000_software_single_step): Remove prototype.
(AIX_TEXT_SEGMENT_BASE): New macro.
* rs6000-nat.c (exec_one_dummy_insn): Replace tdep->text_segment_base
by AIX_TEXT_SEGMENT_BASE.
* ppc-tdep.h (ppc_deal_with_atomic_sequence): Add prototype.
(struct gdbarch_tdep): Remove text_segment_base member.
* ppc-linux-tdep.c (ppc_linux_init_abi): On 64-bit, install
ppc64_sysv_abi_adjust_breakpoint_address.
* Makefile.in (rs6000-tdep.o): Update dependencies.
(rs6000-aix-tdep.o): Likewise.
Thiago Jung Bauermann [Sat, 3 May 2008 23:24:17 +0000 (23:24 +0000)]
2008-05-03 Luis Machado <luisgpm@br.ibm.com>
Thiago Jung Bauermann <bauerman@br.ibm.com>
* cli/cli-decode.c (lookup_cmd_1): Fix indentation.
* doublest.c (convert_typed_floating): Fix typo in comment.
* dwarf2-frame.c (dwarf2_frame_cache): Likewise.
* frame-unwind.h (frame_sniffer_ftype): Likewise.
* frame.c (frame_unwind_address_in_block): Likewise.
* ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): Likewise.
* symtab.h (struct symbol): Likewise.
* tramp-frame.h (struct trad_frame_cache): Likewise.
* value.c (allocate_repeat_value): Likewise.
Ulrich Weigand [Sat, 3 May 2008 23:18:23 +0000 (23:18 +0000)]
* infrun.c (handle_inferior_event): Do not insert breakpoints at
TARGET_WAITKIND_LOADED events during startup (i.e. in the shell).
Pedro Alves [Sat, 3 May 2008 22:30:51 +0000 (22:30 +0000)]
gdb/
* parse.c (parse_exp_in_context): Don't override
expression_context_pc if get_selected_block returned a valid
block.
gdb/testsuite/
* gdb.base/macscp.exp, gdb.base/macscp1.c: Add test for printing
expressions with macros.
Daniel Jacobowitz [Sat, 3 May 2008 22:20:13 +0000 (22:20 +0000)]
* alpha-tdep.h (ALPHA_REGISTER_BYTES): Delete.
* arm-tdep.h (STATUS_REGISTER_SIZE): Delete.
* breakpoint.c (args_for_catchpoint_enable, current_exception_event):
Delete.
* c-typeprint.c (c_type_print_base): Delete handling of template
instantiations.
* cp-support.h (METHOD_PTR_IS_VIRTUAL, METHOD_PTR_FROM_VOFFSET)
(METHOD_PTR_TO_VOFFSET): Delete.
* defs.h (QUIT_FIXME): Delete.
* f-lang.h (DEFAULT_DOTMAIN_NAME_IN_MF77, DEFAULT_MAIN_NAME_IN_MF77)
(DEFAULT_DOTMAIN_NAME_IN_XLF_BUGGY, DEFAULT_DOTMAIN_NAME_IN_XLF): Delete.
* gdbtypes.h (struct cplus_struct_type): Delete is_inlined,
ninstantiations, and instantiations.
(TYPE_INSTANTIATIONS, TYPE_NINSTANTIATIONS, TYPE_INSTANTIATION)
(TYPE_FN_FIELD_INLINED): Delete.
* srec.h (SREC_BINARY): Delete.
* symtab.c (symbol_init_demangled_name): Delete.
* symtab.h (SYMBOL_INIT_DEMANGLED_NAME, symbol_init_demangled_name)
(SYMBOL_OBJFILE, struct exception_event_record, CURRENT_EXCEPTION_KIND)
(CURRENT_EXCEPTION_CATCH_SAL, CURRENT_EXCEPTION_CATCH_LINE)
(CURRENT_EXCEPTION_CATCH_FILE, CURRENT_EXCEPTION_CATCH_PC)
(CURRENT_EXCEPTION_THROW_SAL, CURRENT_EXCEPTION_THROW_LINE)
(CURRENT_EXCEPTION_THROW_FILE, CURRENT_EXCEPTION_THROW_PC): Delete.
* target.h (enum thread_control_capabilities): Delete tc_switch.
(target_can_switch_threads): Delete.
Jan Kratochvil [Sat, 3 May 2008 21:56:38 +0000 (21:56 +0000)]
* gdb.base/dfp-test.exp: Fix random FAIL risk on calling functions.
Daniel Jacobowitz [Sat, 3 May 2008 18:04:02 +0000 (18:04 +0000)]
* Makefile.in (objfiles.o): Update.
* exec.c (exec_set_section_address): Support p->addr != 0.
* objfiles.c (objfile_relocate): Update exec_ops section
addresses.
* symfile.c (place_section): Move exec_set_section_address call...
(default_symfile_offsets): ...to here.
Ulrich Weigand [Sat, 3 May 2008 17:16:44 +0000 (17:16 +0000)]
ChangeLog:
* Makefile.in (ppc_linux_tdep_h): New macro.
(powerpc_32l_c, powerpc_altivec32_c, powerpc_altivec32l_c): Likewise.
(powerpc_64l_c, powerpc_altivec64_c, powerpc_altivec64l_c): Likewise.
(powerpc_e500l_c): Likewise.
(ppc-linux-nat.o): Update dependencies.
(ppc-linux-tdep.o): Update dependencies.
(rs6000-tdep.o): Update dependencies.
* ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Remove.
(ppc_linux_svr4_fetch_link_map_offsets): Remove.
(ppc_linux_gregset, ppc_linux_fpregset): Move to ppc-linux-tdep.h
(ppc_supply_reg, ppc_collect_reg): Add prototypes.
(tdesc_powerpc_e500): Remove.
* rs6000.c: Include "features/rs6000/powerpc-altivec32.c"
and "features/rs6000/powerpc-altivec64.c".
(ppc_supply_reg, ppc_collect_reg): Make global.
(variants): Use tdesc_powerpc_32 for "powerpc" and
tdesc_powerpc_altivec64 for "powerpc64".
(_initialize_rs6000_tdep): Initialize AltiVec descriptions.
* ppc-linux-tdep.h: New file.
* ppc-linux-tdep.c: Include "ppc-linux-tdep.c".
Include "features/rs6000/powerpc-32l.c".
Include "features/rs6000/powerpc-altivec32l.c".
Include "features/rs6000/powerpc-64l.c".
Include "features/rs6000/powerpc-altivec64l.c".
Include "features/rs6000/powerpc-e500l.c".
(ppc_linux_supply_gregset): New function.
(ppc_linux_collect_gregset): Handle orig_r3 and trap registers.
(ppc32_linux_gregset): Use ppc_linux_supply_gregset.
(ppc64_linux_gregset): Likewise.
(ppc_linux_sigtramp_cache): Handle orig_r3 and trap registers.
(ppc_linux_trap_reg_p): New function.
(ppc_linux_write_pc): New function.
(ppc_linux_core_read_description): New function.
(ppc_linux_init_abi): Install ppc_linux_write_pc and
ppc_linux_core_read_description. Install orig_r3 and trap
registers if present in the target description.
(_initialize_ppc_linux_tdep): Initialize Linux target descriptions.
* ppc-linux-nat.c: Include "ppc-linux-tdep.h".
(PT_ORIG_R3, PT_TRAP): Define if necessary.
(ppc_register_u_addr): Handle orig_r3 and trap registers.
(fetch_ppc_registers): Likewise.
(store_ppc_registers): Likewise.
(store_register): Likewise.
(ppc_linux_read_description): Check whether AltiVec is supported.
Check whether inferior is 32-bit or 64-bit. Return the appropriate
Linux target description.
* features/Makefile (WHICH): Use rs6000/powerpc-32l and
rs6000/powerpc-altivec32l instead of rs6000/powerpc-32.
Use rs6000/powerpc-64l and rs6000/powerpc-altivec64l instead
of rs6000/powerpc-64. Use rs6000/powerpc-e500l instead of
rs6000/powerpc-e500. Update -expedite variables accordingly.
* features/rs6000/power-spe.xml: Use regnum 73 for "acc".
* features/rs6000/powerpc-32.xml: Do not include power-altivec.xml.
* features/rs6000/powerpc-64.xml: Do not include power-altivec.xml.
* features/rs6000/powerpc-e500.c: Regenerate.
* features/rs6000/powerpc-32.c: Regenerate.
* features/rs6000/powerpc-64.c: Regenerate.
* features/rs6000/power-linux.xml: New file.
* features/rs6000/power64-linux.xml: New file.
* features/rs6000/powerpc-32l.xml: New file.
* features/rs6000/powerpc-altivec32l.xml: New file.
* features/rs6000/powerpc-64l.xml: New file.
* features/rs6000/powerpc-altivec64l.xml: New file.
* features/rs6000/powerpc-e500l.xml: New file.
* features/rs6000/powerpc-32l.c: New (generated) file.
* features/rs6000/powerpc-altivec32l.c: New (generated) file.
* features/rs6000/powerpc-64l.c: New (generated) file.
* features/rs6000/powerpc-altivec64l.c: New (generated) file.
* features/rs6000/powerpc-e500l.xml: New (generated) file.
* regformats/reg-ppc.dat: Remove.
* regformats/reg-ppc64.dat: Remove.
* regformats/rs6000/powerpc-32.dat: Remove.
* regformats/rs6000/powerpc-64.dat: Remove.
* regformats/rs6000/powerpc-e500.dat: Remove.
* regformats/rs6000/powerpc-32l.dat: New (generated) file.
* regformats/rs6000/powerpc-altivec32l.dat: New (generated) file.
* regformats/rs6000/powerpc-64l.dat: New (generated) file.
* regformats/rs6000/powerpc-altivec64l.dat: New (generated) file.
* regformats/rs6000/powerpc-e500l.dat: New (generated) file.
gdbserver/ChangeLog:
* configure.srv (powerpc*-*-linux*): Set srv_regobj to
powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
powerpc-64l.o, and powerpc-altivec64l.o.
Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
rs6000/power-linux.xml, and rs6000/power64-linux.xml
to srv_xmlfiles.
* Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
(powerpc-32l.o, powerpc-32l.c): ... these new rules.
(powerpc-32.o, powerpc-32.c): Remove, replace by ...
(powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
(powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
(powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
(reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
(powerpc-64l.o, powerpc-64l.c): ... these new rules.
(powerpc-64.o, powerpc-64.c): Remove, replace by ...
(powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
(clean): Update.
* linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
(init_registers_powerpc_32l): ... this new prototype.
(init_registers_powerpc_32): Remove, replace by ...
(init_registers_powerpc_altivec32l): ... this new prototype.
(init_registers_powerpc_e500): Remove, replace by ...
(init_registers_powerpc_e500l): ... this new prototype.
(init_registers_ppc64): Remove, replace by ...
(init_registers_powerpc_64l): ... this new prototype.
(init_registers_powerpc_64): Remove, replace by ...
(init_registers_powerpc_altivec64l): ... this new prototype.
(ppc_num_regs): Set to 73.
(PT_ORIG_R3, PT_TRAP): Define if necessary.
(ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
(ppc_cannot_store_register): Handle orig_r3 and trap.
(ppc_arch_setup): Update init_registers_... calls.
(ppc_fill_gregset): Handle orig_r3 and trap.
* inferiors.c (clear_inferiors): Reset current_inferior.
Vladimir Prus [Sat, 3 May 2008 15:40:12 +0000 (15:40 +0000)]
* gdb.texinfo (GDB/MI Output Records):
Document =thread-create and =thread-exited.
Daniel Jacobowitz [Sat, 3 May 2008 15:36:34 +0000 (15:36 +0000)]
* elf32-arm.c (elf32_arm_symbian_link_hash_table_create): Use
ARRAY_SIZE.
(elf32_arm_symbian_plt_sym_val): New.
(elf_backend_plt_sym_val): Define.
Vladimir Prus [Sat, 3 May 2008 15:36:24 +0000 (15:36 +0000)]
* gdb.texinfo (GDB/MI Development and Front Ends):
Document *thread-created and *thread-exited.
Vladimir Prus [Sat, 3 May 2008 15:10:42 +0000 (15:10 +0000)]
2008-05-03 Pedro Alves <pedro@codesourcery.com>
* thread.c (delete_thread): Call observer_notify_thread_exit.
* mi/mi-interp.c (mi_interpreter_init): Register mi_thread_exit as
thread_exit observer.
(mi_thread_exit): New.
Mike Frysinger [Sat, 3 May 2008 06:19:19 +0000 (06:19 +0000)]
2008-05-03 Mike Frysinger <vapier@gentoo.org>
* ld-scripts/defined.s: Use .set syntax rather than =.
Thiago Jung Bauermann [Sat, 3 May 2008 06:13:21 +0000 (06:13 +0000)]
* breakpoint.c (create_exception_catchpoint): Remove prototype
for already deleted function.
* breakpoint.h (ep_is_exception_catchpoint): Likewise.
* frame.h (show_stack_frame): Remove prototype.
* stack.c (show_stack_frame): Remove empty, unused function.
* source.c (symtab_to_fullname, print_source_lines): Small fix
in comment.
* value.c (show_values): Update comments to mention "show values"
command instead of "info history".
Alan Modra [Sat, 3 May 2008 05:18:02 +0000 (05:18 +0000)]
PR 2995, PR 6473
* elf.c (rewrite_elf_program_header): Rather than clearing
p_paddr_valid at end, don't set it in the first place. Delete
comment no longer relevant. When not p_paddr_valid, don't set
paddr from vaddr, and don't set p_vaddr_offset.
Ulrich Weigand [Sat, 3 May 2008 00:37:35 +0000 (00:37 +0000)]
* linespec.c: Include "target.h".
(minsym_found): Handle minimal symbols pointing to function
descriptors. Use find_function_start_pc.
* minsyms.c (msymbol_objfile): New function.
* parse.c (write_exp_msymbol): Handle minimal symbols pointing
to function descriptors.
* symtab.c (fixup_section): Only use minimal symbol at the same
address to determine section of a symbol.
(find_function_start_pc): New function.
(find_function_start_sal): Use it.
* symtab.h (msymbol_objfile): Add prototype.
(find_function_start_pc): Likewise.
* value.c: Include "objfiles.h".
(value_fn_field): Handle minimal symbols pointing to function
descriptors.
* Makefile.in (linespec.o): Update dependencies.
(value.o): Likewise.
gdbadmin [Sat, 3 May 2008 00:00:35 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Sat, 3 May 2008 00:00:05 +0000 (00:00 +0000)]
daily update
Joel Brobecker [Fri, 2 May 2008 23:41:40 +0000 (23:41 +0000)]
* ada-lang.c (unwrap_value): Handle the case where the "F" field
inside a PAD type is a bitfield.
Ulrich Weigand [Fri, 2 May 2008 23:24:44 +0000 (23:24 +0000)]
* ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): Handle
TYPE_CODE_BOOL and TYPE_CODE_CHAR the same as TYPE_CODE_INT.
Handle TYPE_CODE_REF the same as TYPE_CODE_PTR.
Handle TYPE_CODE_METHOD the same as TYPE_CODE_FUNC.
Allow typedefs when checking for function pointer arguments.
Right-align small structs passed on the stack.
(ppc64_sysv_abi_return_value): Handle TYPE_CODE_BOOL and
TYPE_CODE_CHAR the same as TYPE_CODE_INT.
Handle TYPE_CODE_REF the same as TYPE_CODE_PTR.
Daniel Jacobowitz [Fri, 2 May 2008 20:38:16 +0000 (20:38 +0000)]
* Makefile.in (arm-tdep.o): Update.
* arm-tdep.c (arm_objfile_data_key, struct arm_mapping_symbol)
(struct arm_per_objfile, arm_compare_mapping_symbols): New.
(arm_pc_is_thumb): Use mapping symbols.
(arm_objfile_data_cleanup, arm_record_special_symbol): New.
(arm_gdbarch_init): Call set_gdbarch_record_special_symbol.
(_initialize_arm_tdep): Initialize arm_objfile_data_key.
* elfread.c (elf_symtab_read): Use gdbarch_record_special_symbol.
* gdbarch.sh: Add record_special_symbol.
* gdbarch.c, gdbarch.h: Regenerated.
* objfiles.c (struct objfile_data): Add cleanup member.
(register_objfile_data_with_cleanup): New function, from
register_objfile_data.
(register_objfile_data): Use it.
(objfile_free_data): Call clear_objfile_data.
(clear_objfile_data): Call cleanup functions.
* objfiles.h (register_objfile_data_with_cleanup): Declare.
Daniel Jacobowitz [Fri, 2 May 2008 20:35:39 +0000 (20:35 +0000)]
* objfiles.c (init_entry_point_info): Handle shared libraries.
Daniel Jacobowitz [Fri, 2 May 2008 20:30:49 +0000 (20:30 +0000)]
* gdb.base/completion.exp: Handle lack of other symbols beginning
with "a".
* gdb.base/varargs.exp: Correct quoting for options to gdb_compile.
Daniel Jacobowitz [Fri, 2 May 2008 17:24:50 +0000 (17:24 +0000)]
* arm-tdep.c (arm_prologue_this_id): Compare pc, not func, to
lowest_pc.
H.J. Lu [Fri, 2 May 2008 16:53:40 +0000 (16:53 +0000)]
gas/
2008-05-02 H.J. Lu <hongjiu.lu@intel.com>
* NEWS: Mention XSAVE, EPT and MOVBE.
* config/tc-i386.c (cpu_arch): Add .movbe and .ept.
(md_show_usage): Add .movbe and .ept.
* doc/c-i386.texi: Add movbe and ept to -march=. Document
.movbe and .ept.
gas/testsuite/
2008-05-02 H.J. Lu <hongjiu.lu@intel.com>
* gas/i386/i386.exp: Run movbe, movbe-intel, inval-movbe, ept,
ept-intel, inval-ept, x86-64-movbe, x86-64-movbe-intel,
x86-64-inval-movbe. x86-64-ept, x86-64-ept-intel and
x86-64-inval-ept.
* gas/i386/arch-10.s: Add movbe and invept.
* gas/i386/x86-64-arch-2.s: Likewise.
* gas/i386/ept.d: New file
* gas/i386/ept-intel.d: Likewise.
* gas/i386/ept.s: Likewise.
* gas/i386/inval-ept.l: Likewise.
* gas/i386/inval-ept.s: Likewise.
* gas/i386/inval-movbe.l: Likewise.
* gas/i386/inval-movbe.s: Likewise.
* gas/i386/movbe.d: Likewise.
* gas/i386/movbe-intel.d: Likewise.
* gas/i386/movbe.s: Likewise.
* gas/i386/x86-64-inval-ept.l: Likewise.
* gas/i386/x86-64-inval-ept.s: Likewise.
* gas/i386/x86-64-inval-movbe.l: Likewise.
* gas/i386/x86-64-inval-movbe.s: Likewise.
* gas/i386/x86-64-ept.d: Likewise.
* gas/i386/x86-64-ept-intel.d: Likewise.
* gas/i386/x86-64-ept.s: Likewise.
* gas/i386/x86-64-movbe.d: Likewise.
* gas/i386/x86-64-movbe-intel.d: Likewise.
* gas/i386/x86-64-movbe.s: Likewise.
* gas/i386/arch-10.d: Updated.
* gas/i386/arch-10-1.l: Likewise.
* gas/i386/arch-10-2.l: Likewise.
* gas/i386/arch-10-3.l: Likewise.
* gas/i386/arch-10-4.l: Likewise.
* gas/i386/x86-64-arch-2.d: Likewise.
opcodes/
2008-05-02 H.J. Lu <hongjiu.lu@intel.com>
* i386-dis.c (MOVBE_Fixup): New.
(Mo): Likewise.
(PREFIX_0F3880): Likewise.
(PREFIX_0F3881): Likewise.
(PREFIX_0F38F0): Updated.
(prefix_table): Add PREFIX_0F3880 and PREFIX_0F3881. Update
PREFIX_0F38F0 and PREFIX_0F38F1 for movbe.
(three_byte_table): Use PREFIX_0F3880 and PREFIX_0F3881.
* i386-gen.c (cpu_flag_init): Add CPU_MOVBE_FLAGS and
CPU_EPT_FLAGS.
(cpu_flags): Add CpuMovbe and CpuEPT.
* i386-opc.h (CpuMovbe): New.
(CpuEPT): Likewise.
(CpuLM): Updated.
(i386_cpu_flags): Add cpumovbe and cpuept.
* i386-opc.tbl: Add entries for movbe and EPT instructions.
* i386-init.h: Regenerated.
* i386-tbl.h: Likewise.
Pedro Alves [Fri, 2 May 2008 16:49:54 +0000 (16:49 +0000)]
Implement displaced stepping.
gdb/
* gdbarch.sh (max_insn_length): New 'variable'.
(displaced_step_copy, displaced_step_fixup)
(displaced_step_free_closure, displaced_step_location): New
functions.
(struct displaced_step_closure): Add forward declaration.
* gdbarch.c, gdbarch.h: Regenerated.
* arch-utils.c: #include "objfiles.h".
(simple_displaced_step_copy_insn)
(simple_displaced_step_free_closure)
(displaced_step_at_entry_point): New functions.
* arch-utils.h (simple_displaced_step_copy_insn)
(simple_displaced_step_free_closure)
(displaced_step_at_entry_point): New prototypes.
* i386-tdep.c (I386_MAX_INSN_LEN): Rename to...
(I386_MAX_MATCHED_INSN_LEN): ... this.
(i386_absolute_jmp_p, i386_absolute_call_p)
(i386_ret_p, i386_call_p, i386_breakpoint_p, i386_syscall_p)
(i386_displaced_step_fixup): New functions.
(struct i386_insn, i386_match_insn): Update.
(i386_gdbarch_init): Set gdbarch_max_insn_length.
* i386-tdep.h (I386_MAX_INSN_LEN): New.
(i386_displaced_step_fixup): New prototype.
* i386-linux-tdep.c (i386_linux_init_abi): Include "arch-utils.h".
Register gdbarch_displaced_step_copy,
gdbarch_displaced_step_fixup, gdbarch_displaced_step_free_closure,
and gdbarch_displaced_step_location functions.
* infrun.c (debug_displaced): New variable.
(show_debug_displaced): New function.
(struct displaced_step_request): New struct.
(displaced_step_request_queue, displaced_step_ptid)
(displaced_step_gdbarch, displaced_step_closure)
(displaced_step_original, displaced_step_copy)
(displaced_step_saved_copy, can_use_displaced_stepping): New
variables.
(show_can_use_displaced_stepping, use_displaced_stepping)
(displaced_step_clear, cleanup_displaced_step_closure)
(displaced_step_dump_bytes, displaced_step_prepare)
(displaced_step_clear_cleanup, write_memory_ptid)
(displaced_step_fixup): New functions.
(resume): Call displaced_step_prepare.
(proceed): Call read_pc once, and remember the value. If using
displaced stepping, don't remove breakpoints.
(handle_inferior_event): Call displaced_step_fixup. Add some
debugging output. When we try to step over a breakpoint, but get
a signal to deliver to the thread instead, ensure the step-resume
breakpoint is actually inserted. If a thread hop is needed, and
displaced stepping is enabled, don't remove breakpoints.
(init_wait_for_inferior): Call displaced_step_clear.
(_initialize_infrun): Add "set debug displaced" command. Add
"maint set can-use-displaced-stepping" command. Clear
displaced_step_ptid.
* inferior.h (debug_displaced): Declare variable.
(displaced_step_dump_bytes): Declare function.
* Makefile.in (arch-utils.o, i386-linux-tdep.o): Update
dependencies.
gdb/testsuite/
* gdb.asm/asmsrc1.s: Add scratch space.
gdb/doc/
* gdb.texinfo (Debugging Output): Document "set/show debug
displaced".
(Maintenance Commands): Document "maint set/show
can-use-displaced-stepping".
Daniel Jacobowitz [Fri, 2 May 2008 16:00:36 +0000 (16:00 +0000)]
* arm-tdep.c (arm_mode_strings, arm_fallback_mode_string)
(arm_force_mode_string, arm_show_fallback_mode)
(arm_show_force_mode): New.
(arm_pc_is_thumb): Honor fallback-mode and force-mode. Use
arm_frame_is_thumb.
(_initialize_arm_tdep): Add "set arm fallback-mode"
and "set arm force-mode".
* NEWS: Document new commands.
* gdb.texinfo (ARM): Document set/show arm fallback-mode
and set/show arm force-mode.
H.J. Lu [Fri, 2 May 2008 15:11:49 +0000 (15:11 +0000)]
2008-05-02 H.J. Lu <hongjiu.lu@intel.com>
PR ld/6475
* ld-scripts/rgn-over8-ok.d: Accept any alignment.
Andrew Stubbs [Fri, 2 May 2008 13:58:38 +0000 (13:58 +0000)]
2008-05-02 Andrew Stubbs <andrew.stubbs@st.com>
* main.h (batch_silent): Declare.
* event-top.c: Include main.h.
(gdb_setup_readline): Remove extern batch_silent declaration.
* infrun.c (normal_stop): Don't print source location when running in
--batch-silent mode.
* Makefile.in (event-top.o): Add main.h dependency.
Andreas Schwab [Fri, 2 May 2008 11:07:25 +0000 (11:07 +0000)]
* target.h (struct target_ops): Add
to_watchpoint_addr_within_range.
(target_watchpoint_addr_within_range): New function.
* target.c (update_current_target): Inherit
to_watchpoint_addr_within_range, defaulting to
default_watchpoint_addr_within_range.
(default_watchpoint_addr_within_range): New function.
(debug_to_watchpoint_addr_within_range): New function.
(setup_target_debug): Set to_watchpoint_addr_within_range.
* ppc-linux-nat.c (ppc_linux_watchpoint_addr_within_range):
New function.
(_initialize_ppc_linux_nat): Set to_watchpoint_addr_within_range.
* breakpoint.c (watchpoints_triggered): Use
target_watchpoint_addr_within_range.
* gdbint.texinfo (Algorithms): Describe
target_watchpoint_addr_within_range.
Alan Modra [Fri, 2 May 2008 00:00:05 +0000 (00:00 +0000)]
daily update
gdbadmin [Fri, 2 May 2008 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***
Pedro Alves [Thu, 1 May 2008 23:09:14 +0000 (23:09 +0000)]
* configure.tgt: Add i[34567]86-*-dicos* and x86_64-*-dicos*.
(i[34567]86-*-dicos*, x86_64-*-dicos*):
Set gdb_osabi to GDB_OSABI_DICOS.
* defs.h (enum gdb_osabi): Add GDB_OSABI_DICOS.
* osabi.c (gdb_osabi_name): Add "DICOS".
* i386-dicos-tdep.c: New file.
* Makefile.in (ALL_TARGET_OBS): Add i386-dicos-tdep.o.
(ALLDEPFILES): Add i386-dicos-tdep.c.
(i386-dicos-tdep.o): New rule.
Pedro Alves [Thu, 1 May 2008 22:48:49 +0000 (22:48 +0000)]
* linux-nat.c (linux_nat_switch_fork): Reinit GDB's thread list
and register the fork's PTID as a thread.
Aleksandar Ristovski [Thu, 1 May 2008 20:35:33 +0000 (20:35 +0000)]
PR gdb/1665
* breakpoint.c (create_breakpoint): Add breakpoint_ops argument and
assign its value to the breakpoint created.
(create_breakpoints): Add breakpoint_ops argument and pass it
to create_breakpoint call.
(break_command_really): Add breakpoint_ops argument and pass/assign
appropriately.
(break_command_1): Pass NULL as ops argument.
(set_breakpoint): Pass NULL as ops argument.
(print_one_exception_catchpoint): Print <PENDING> if no loc available.
(handle_gnu_v3_exceptions): Call generic breakpoint code to insert
catch and throw catchpoints.
Aleksandar Ristovski [Thu, 1 May 2008 19:31:52 +0000 (19:31 +0000)]
PR gdb/2343
* corelow.c (core_open): Use gdbarch_target_signal_from_host to
translate signal numeric value from the target to GDB's enum
target_signal.
* gdbarch.c, gdbarch.h: Regenerated.
* gdbarch.sh: Added two new functions target_signal_from_host and
target_signal_to_host.
* target.h (default_target_signal_from_host,
default_target_signal_to_host): New functions - declarations.
* signals/signals.c (struct gdbarch): New declaration.
(default_target_signal_to_host, default_target_signal_from_host): New
functions.
Daniel Jacobowitz [Thu, 1 May 2008 18:50:14 +0000 (18:50 +0000)]
2008-05-01 Daniel Jacobowitz <dan@codesourcery.com>
Pedro Alves <pedro@codesourcery.com>
Based on work by Jan Kratochvil <jan.kratochvil@redhat.com> and Jeff
Johnston <jjohnstn@redhat.com>.
* NEWS: Mention attach to stopped process fix.
* infcmd.c (detach_command, disconnect_command): Discard the thread
list.
* infrun.c (handle_inferior_event): Do not ignore non-SIGSTOP while
attaching. Use signal_stop_state.
(signal_stop_state): Check stop_soon.
* linux-nat.c (kill_lwp): Declare earlier.
(pid_is_stopped, linux_nat_post_attach_wait): New.
(lin_lwp_attach_lwp): Use linux_nat_post_attach_wait. Update
comments.
(linux_nat_attach): Use linux_nat_post_attach_wait.
(detach_callback, linux_nat_detach): Improve handling for signalled
processes.
(linux_nat_pid_to_str): Always print out the LWP ID if it differs
from the process ID.
* Makefile.in (infcmd.o): Update.
2008-05-01 Jan Kratochvil <jan.kratochvil@redhat.com>
Daniel Jacobowitz <dan@codesourcery.com>
* gdb.threads/attach-into-signal.c, gdb.threads/attach-into-signal.exp,
gdb.threads/attach-stopped.c, gdb.threads/attach-stopped.exp,
gdb.threads/attachstop-mt.c, gdb.threads/attachstop-mt.exp: New.
Daniel Jacobowitz [Thu, 1 May 2008 18:32:52 +0000 (18:32 +0000)]
Add lost bit of previous commit.
Daniel Jacobowitz [Thu, 1 May 2008 18:30:51 +0000 (18:30 +0000)]
* arm-linux-tdep.h (ARM_CPSR_REGNUM): Delete definition.
* arm-tdep.c (arm_frame_is_thumb): New.
(arm_pc_is_thumb): Clarify comment.
(thumb_analyze_prologue): Remove PC special case.
(thumb_scan_prologue): Take a block_addr argument. Use it for
find_pc_partial_function. Remove unused variables.
(arm_scan_prologue): Use arm_frame_is_thumb. Use the block address
for find_pc_partial_function. Remove PC special case.
(arm_prologue_prev_register): Add special handling for PC and CPSR.
(arm_dwarf2_prev_register, arm_dwarf2_frame_init_reg): New.
(arm_get_next_pc): Use arm_frame_is_thumb.
(arm_write_pc): Use CPSR_T instead of 0x20.
(arm_gdbarch_init): Call dwarf2_frame_set_init_reg.
* arm-tdep.h (enum gdb_regnum): Add ARM_CPSR_REGNUM.
(CPSR_T): Define.
* dwarf2-frame.c (dwarf2_frame_prev_register): Handle
DWARF2_FRAME_REG_FN.
* dwarf2-frame.h (enum dwarf2_frame_reg_rule): Add
DWARF2_FRAME_REG_FN.
(struct dwarf2_frame_state_reg): Add FN to loc union.
* gdb.arch/thumb-prologue.exp: Do not expect a saved PC.
Joel Brobecker [Thu, 1 May 2008 17:48:23 +0000 (17:48 +0000)]
* gdb.base/info-target.exp: New testcase.
Joel Brobecker [Thu, 1 May 2008 17:46:32 +0000 (17:46 +0000)]
* exec.c (print_section_info): Add missing '\n'.
Cary Coutant [Thu, 1 May 2008 17:06:52 +0000 (17:06 +0000)]
* elf.c (bfd_elf_get_str_section): Fix memory leak caused by
corrupt string table.
Joel Brobecker [Thu, 1 May 2008 15:45:43 +0000 (15:45 +0000)]
* cache.c (cache_bread_1): Renames cache_bread.
(cache_bread): New function.
Nick Clifton [Thu, 1 May 2008 14:34:51 +0000 (14:34 +0000)]
* readelf.c (print_symbol): Add code to display non-printing characters.
Vladimir Prus [Thu, 1 May 2008 14:27:39 +0000 (14:27 +0000)]
* thread.c (add_thread): Move observer call to ...
(add_thread_silent): ... here.
Alan Modra [Thu, 1 May 2008 14:13:58 +0000 (14:13 +0000)]
PR 2995, PR 6473
* elf.c (_bfd_elf_make_section_from_shdr): Always set lma from p_paddr.
(assign_file_positions_for_load_sections): Combine nested "if".
(copy_elf_program_header): Don't set p_paddr_valid or p_vaddr_offset
when all header p_paddr fields are zero.
Cary Coutant [Thu, 1 May 2008 02:01:23 +0000 (02:01 +0000)]
* target-reloc.h (relocate_section): Fix dead-pointer bug.
Cary Coutant [Thu, 1 May 2008 01:23:21 +0000 (01:23 +0000)]
* layout.cc (Layout::include_section): Refactored check for debug
info section.
(Layout::add_comdat): Add new parameters. Change type
of signature parameter. Add object and shndx to signatures table.
(Layout::find_kept_object): New function.
* layout.h: Include <cstring>.
(Layout::is_debug_info_section): New function.
(Layout::add_comdat): Add new parameters.
(Layout::find_kept_object): New function.
(Layout::Kept_section): New struct.
(Layout::Signatures): Change type of map range.
* object.cc (Relobj::output_section_address): New function.
(Sized_relobj::include_section_group): Add new parameters. Change
calls to Layout::add_comdat. Change to build table of kept comdat
groups and table mapping discarded sections to kept sections.
(Sized_relobj::include_linkonce_section): Likewise. Add new parameter.
(Sized_relobj::do_layout): Change calls to include_section_group and
include_linkonce_section.
(Sized_relobj::do_finalize_local_symbols): Do not set local symbol
value to zero when section is discarded.
(Sized_relobj::map_to_kept_section): New function.
* object.h (Relobj::output_section_address): New function.
(Relobj::Comdat_group): New type.
(Relobj::find_comdat_group): New function.
(Relobj::Comdat_group_table): New type.
(Relobj::Kept_comdat_section): New type.
(Relobj::Kept_comdat_section_table): New type.
(Relobj::add_comdat_group): New function.
(Relobj::set_kept_comdat_section): New function.
(Relobj::get_kept_comdat_section): New function.
(Relobj::comdat_groups_): New field.
(Relobj::kept_comdat_sections_): New field.
(Symbol_value::input_value): Update comment.
(Sized_relobj::map_to_kept_section) New function.
(Sized_relobj::include_linkonce_section): Add new parameter.
* target-reloc.h (Comdat_behavior): New type.
(get_comdat_behavior): New function.
(relocate_section): Add code to map a discarded section to the
corresponding kept section when applying a relocation.
Ulrich Weigand [Thu, 1 May 2008 00:40:39 +0000 (00:40 +0000)]
* rs6000-tdep.c: Update for unwinder changes.
* ppcobsd-tdep.c: Likewise.
Craig Silverstein [Thu, 1 May 2008 00:25:33 +0000 (00:25 +0000)]
* dwarf_reader.cc (next_generation_count): New static var.
(Addr2line_cache_entry): New struct.
(addr2line_cache): New static var.
(Dwarf_line_info::one_addr2line): Added caching.
(Dwarf_line_info::clear_addr2line_cache): New function.
* dwarf_reader.h (Dwarf_line_info::one_addr2line): Add
cache-size parameter.
(Dwarf_line_info::one_addr2line_cache): New function.
* symtab.cc (Symbol_table::detect_odr_violations): Pass
new cache-size argument to one_addr2line(), and clear cache.
Ulrich Weigand [Thu, 1 May 2008 00:18:27 +0000 (00:18 +0000)]
* s390-tdep.c: Update for unwinder changes.
Ulrich Weigand [Thu, 1 May 2008 00:08:28 +0000 (00:08 +0000)]
* spu-tdep.c: Update for unwinder changes.
gdbadmin [Thu, 1 May 2008 00:00:40 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Thu, 1 May 2008 00:00:06 +0000 (00:00 +0000)]
daily update
Daniel Jacobowitz [Wed, 30 Apr 2008 21:28:57 +0000 (21:28 +0000)]
* hppanbsd-tdep.c, m68kbsd-tdep.c, mn10300-linux-tdep.c,
ppc-linux-tdep.c, ppcnbsd-tdep.c, sparc-linux-tdep.c,
sparc64-linux-tdep.c: Update for unwinder changes.
Daniel Jacobowitz [Wed, 30 Apr 2008 21:25:16 +0000 (21:25 +0000)]
* mipsnbsd-tdep.c, mips64obsd-tdep.c, mips-linux-tdep.c: Update
for unwinder changes.
* mips-tdep.c: Likewise.
(mips_stub_frame_cache): Unwind the ABI stack pointer, not the
raw one.
Daniel Jacobowitz [Wed, 30 Apr 2008 21:23:45 +0000 (21:23 +0000)]
* arm-linux-tdep.c, arm-tdep.c, armobsd-tdep.c: Update for
unwinder changes.
Daniel Jacobowitz [Wed, 30 Apr 2008 21:19:45 +0000 (21:19 +0000)]
Update i386 and amd64 ports for unwinder changes.
* amd64-tdep.c (amd64_frame_cache): Expect this_frame.
(amd64_frame_this_id, amd64_frame_prev_register): Update signature.
(amd64_frame_unwind): Use default_frame_sniffer.
(amd64_frame_sniffer): Delete.
(amd64_sigtramp_frame_cache): Expect this_frame.
(amd64_sigtramp_frame_this_id, amd64_sigtramp_frame_prev_register)
(amd64_sigtramp_frame_sniffer): Update signature.
(amd64_sigtramp_frame_unwind): Add amd64_sigtramp_frame_sniffer.
(amd64_frame_base_address): Expect this_frame.
(amd64_dummy_id): Renamed from amd64_unwind_dummy_id. Expect
this_frame.
(amd64_init_abi): Use set_gdbarch_dummy_id and
frame_unwind_append_unwinder.
* i386-tdep.c (i386_frame_cache): Expect this_frame.
(i386_frame_this_id, i386_frame_prev_register): Update signature.
(i386_frame_unwind): Use default_frame_sniffer.
(i386_frame_sniffer): Delete.
(i386_sigtramp_frame_cache): Expect this_frame.
(i386_sigtramp_frame_this_id, i386_sigtramp_frame_prev_register)
(i386_sigtramp_frame_sniffer): Update signature.
(i386_sigtramp_frame_unwind): Use i386_sigtramp_frame_sniffer.
(i386_frame_base_address): Update signature.
(i386_dummy_id): Rename from i386_unwind_dummy_id. Expect this_frame.
(i386_push_dummy_call): Update comment.
(i386_sigtramp_p, i386_svr4_sigtramp_p, i386_svr4_sigcontext_addr):
Expect this_frame.
(i386_gdbarch_init): Use set_gdbarch_dummy_id, dwarf2_append_unwinders,
and frame_unwind_append_unwinder.
* amd64-linux-tdep.c, amd64-sol2-tdep.c, amd64fbsd-tdep.c,
amd64nbsd-tdep.c, amd64obsd-tdep.c, i386-linux-tdep.c,
i386-nto-tdep.c, i386bsd-tdep.c, i386-sol2-tdep.c, i386obsd-tdep.c,
i386nbsd-tdep.c: Update for unwinder changes.
Daniel Jacobowitz [Wed, 30 Apr 2008 21:19:10 +0000 (21:19 +0000)]
* trad-frame.c (struct trad_frame_cache): Rename next_frame to this_frame.
(trad_frame_cache_zalloc, trad_frame_alloc_saved_regs): Expect
this_frame.
(trad_frame_get_prev_register, trad_frame_get_register): Update signature.
* trad-frame.h (trad_frame_cache_zalloc, trad_frame_get_register)
(trad_frame_alloc_saved_regs, trad_frame_get_prev_register): Update
signature.
* tramp-frame.c (tramp_frame_cache, tramp_frame_start): Expect
this_frame.
(tramp_frame_this_id, tramp_frame_prev_register, tramp_frame_sniffer):
Update signature.
* tramp-frame.h (struct tramp_frame): Update signature of init.
* Makefile.in (trad-frame.o): Update.
Daniel Jacobowitz [Wed, 30 Apr 2008 21:18:28 +0000 (21:18 +0000)]
* dwarf2-frame.c (read_reg): Expect this_frame in the baton.
(execute_stack_op): Put this_frame in the baton.
(execute_cfa_program): Take this_frame.
(struct dwarf2_frame_ops): Update comment for signal_frame_p.
(dwarf2_frame_default_init_reg, dwarf2_frame_init_reg)
(dwarf2_frame_signal_frame_p, dwarf2_frame_cache)
(dwarf2_frame_this_id): Adjust to work on this_frame.
(dwarf2_signal_frame_this_id): Delete.
(dwarf2_frame_prev_register): Update signature. Use new frame
unwind methods.
(dwarf2_frame_sniffer): Update signature. Expect this_frame.
(dwarf2_frame_unwind, dwarf2_signal_frame_unwind): Add
dwarf2_frame_sniffer.
(dwarf2_append_unwinders): New.
(dwarf2_frame_base_address, dwarf2_frame_base_sniffer): Expect
this_frame.
* sparc-tdep.c (sparc32_dwarf2_struct_return_p)
(sparc32_dwarf2_frame_init_reg): Expect this_frame.
* cris-tdep.c (cris_dwarf2_frame_init_reg): Likewise.
* rs6000-tdep.c (ppc_dwarf2_frame_init_reg): Likewise.
* s390-tdep.c (s390_dwarf2_frame_init_reg): Likewise.
* sh-tdep.c (sh_dwarf2_frame_init_reg): Likewise.
* sparc64-tdep.c (sparc64_dwarf2_frame_init_reg): Likewise.
* dwarf2-frame.h (dwarf2_frame_sniffer): Delete declaration.
(dwarf2_append_unwinders): Declare.
(dwarf2_frame_base_sniffer): Update declaration.
* i386-linux-tdep.c (i386_linux_dwarf_signal_frame_p): Expect
this_frame.
Daniel Jacobowitz [Wed, 30 Apr 2008 21:16:46 +0000 (21:16 +0000)]
Convert frame unwinders to use the current frame and
"struct value".
* frame.c (frame_debug): Make global.
(get_frame_id): Pass this frame to unwinder routines.
(frame_pc_unwind): Remove unused unwind->prev_pc support.
(do_frame_register_read): Do not discard the return value of
frame_register_read.
(frame_register_unwind): Remove debug messages. Use
frame_unwind_register_value.
(frame_unwind_register_value, get_frame_register_value): New
functions.
(create_new_frame, get_frame_base_address, get_frame_locals_address)
(get_frame_args_address, get_frame_type): Pass this frame to
unwinder routines.
(frame_cleanup_after_sniffer, frame_prepare_for_sniffer): New
functions.
* frame.h: Update comments.
(frame_debug, frame_unwind_register_value, get_frame_register_value)
(frame_prepare_for_sniffer): Declare.
* frame-unwind.h: Update comments and parameter names.
(default_frame_sniffer): Declare.
(frame_prev_register_ftype): Return a struct value *.
(struct frame_unwind): Remove prev_pc member.
(frame_unwind_sniffer_ftype, frame_unwind_append_sniffer): Delete.
(frame_unwind_append_unwinder, frame_unwind_got_optimized)
(frame_unwind_got_register, frame_unwind_got_memory)
(frame_unwind_got_constant, frame_unwind_got_address): Declare.
* frame-base.h: Update comments and parameter names.
* valops.c (value_fetch_lazy): Use get_frame_register_value. Iterate
if necessary. Add debugging output.
* sentinel-frame.c (sentinel_frame_prev_register)
(sentinel_frame_this_id): Update for new signature.
(sentinel_frame_prev_pc): Delete.
(sentinel_frame_unwinder): Remove prev_pc.
* ia64-tdep.c (ia64_libunwind_frame_unwind): Do not initialize
prev_pc.
* libunwind-frame.c (libunwind_frame_unwind): Likewise.
* frame-unwind.c (struct frame_unwind_table_entry): Remove sniffer.
(frame_unwind_append_sniffer): Delete.
(frame_unwind_append_unwinder): New function.
(frame_unwind_find_by_frame): Take this frame. Only use sniffers
from unwinders. Use frame_prepare_for_sniffer.
(default_frame_sniffer, frame_unwind_got_optimized)
(frame_unwind_got_register, frame_unwind_got_memory)
(frame_unwind_got_constant, frame_unwind_got_address): New functions.
* dummy-frame.c (dummy_frame_sniffer): Use gdbarch_dummy_id.
(dummy_frame_prev_register, dummy_frame_this_id): Update for new
signature.
* gdbarch.sh: Replace unwind_dummy_id with dummy_id.
* gdbarch.c, gdbarch.c: Regenerated.
* frame-base.c (default_frame_base_address)
(default_frame_locals_address, default_frame_args_address): Update
for new signature.
(frame_base_find_by_frame): Pass this frame to unwinder routines.
* infcall.c (call_function_by_hand): Update comments.
* Makefile.in (frame-unwind.o): Update dependencies.
* gdbint.texinfo (Stack Frames): New chapter.
(Algorithms): Move Frames text to the new chapter.
(Target Conditionals): Delete SAVE_DUMMY_FRAME_TOS. Document
gdbarch_dummy_id instead of gdbarch_unwind_dummy_id.