Commit Graph

56330 Commits

Author SHA1 Message Date
Ian Lance Taylor ad8f37d1ba Stringpool stats. Also make Symbol_table support functions inline. 2007-12-05 00:48:49 +00:00
gdbadmin 055f1d8ffc *** empty log message *** 2007-12-05 00:00:03 +00:00
Jim Blandy 801e3a5b56 Support lexical blocks and function bodies that occupy
non-contiguous address ranges.
* addrmap.c, addrmap.h: New files.
* block.h (struct addrmap): New forward declaration.
(struct blockvector): New member, 'map'.
(BLOCKVECTOR_MAP): New accessor macro.
* block.c: #include "addrmap.h"
(blockvector_for_pc_sect): If the blockvector we've found has
an address map, use it instead of searching the blocks.
* buildsym.c: #include "addrmap.h"
(pending_addrmap_obstack, pending_addrmap_interesting): New static
variables.
(really_free_pendings): If we have a pending addrmap, free it too.
(record_block_range): New function.
(make_blockvector): If we have an interesting pending addrmap,
record it in the new blockvector.
(start_symtab, buildsym_init): Assert that there is no pending
addrmap now; we should have cleaned up any addrmaps we'd built
previously.
(end_symtab): If there is a pending addrmap left over that didn't
get included in the blockvector, free it.
* buildsym.h (struct addrmap): New forward declaration.
(record_block_range): New prototype.
* objfiles.c: #include "addrmap.h".
(objfile_relocate): Relocate the blockvector's address map, if
present.
* dwarf2read.c (dwarf2_record_block_ranges): New function.
(read_func_scope, read_lexical_block_scope): Call it.
* Makefile.in (SFILES): Add addrmap.c.
(addrmap_h): New header dependency variable.
(COMMON_OBS): Add addrmap.o.
(addrmap.o): New rule.l
(block.o, objfiles.o, buildsym.o): Depend on $(addrmap_h).

* block.c (blockvector_for_pc, blockvector_for_pc_sect): Return a
pointer to the block, not its index in the blockvector.
(block_for_pc_sect): Use the returned block, instead of looking it
up ourselves.
* block.h (blockvector_for_pc, blockvector_for_pc_sect): Update
declarations.
* breakpoint.c (resolve_sal_pc): Use returned block, instead of
looking it up ourselves.
* stack.c (print_frame_label_vars): Disable function, which
depends on the block's index.

* buildsym.c (finish_block): Return the block we've built.
* buildsym.h (finish_block): Update prototype.

* defs.h (CORE_ADDR_MAX): New constant.
2007-12-04 23:43:57 +00:00
Ian Lance Taylor c420411fe8 From Craig Silverstein: Support irregular output files. 2007-12-04 23:42:28 +00:00
Ulrich Weigand 6ccb916229 * coffread.c (decode_type): Use builtin_type_int32 instead
of FT_INTEGER fundamental type for array range index type.
	(decode_base_type): Use builtin types of current_gdbarch
	instead of fundamental types.

	* dwarf2read.c (struct dwarf2_cu): Remove ftypes member.
	(read_file_scope): Do not initialize ftypes member.
	(dwarf_base_type, dwarf2_fundamental_types): Remove functions.
	(read_array_type): Use builtin_type_int32 instead of FT_INTEGER
	fundamental type for array range index type.
	(read_tag_string_type): Likewise for string range index type.
	Also, do not overwrite FT_CHAR type with new string type.
	(read_base_type): If DW_AT_name is missing, create unnamed type
	with given properties instead of looking for a fundamental type.
	Create new types as TYPE_TARGET_TYPE for DW_ATE_address and
	DW_ATE_complex_float types.
	(read_subrange_type): Create new type to represent missing
	DW_AT_type instead of looking for a fundamental type.
	(die_type): Use builtin type to represent "void" instead of
	looking for a fundamental type.

	* stabsread.c (define_symbol): Use builtin types to represent
	'r' and 'i' floating-point and integer constants.

	* gdbtypes.c (lookup_fundamental_type): Remove.
	* gdbtypes.h (lookup_fundamental_type): Remove prototype.
	(FT_VOID, FT_BOOLEAN, FT_CHAR, FT_SIGNED_CHAR, FT_UNSIGNED_CHAR,
	FT_SHORT, FT_SIGNED_SHORT, FT_UNSIGNED_SHORT, FT_INTEGER,
	FT_SIGNED_INTEGER, FT_UNSIGNED_INTEGER, FT_LONG, FT_SIGNED_LONG,
	FT_UNSIGNED_LONG, FT_LONG_LONG, FT_SIGNED_LONG_LONG,
	FT_UNSIGNED_LONG_LONG, FT_FLOAT, FT_DBL_PREC_FLOAT, FT_EXT_PREC_FLOAT,
	FT_COMPLEX, FT_DBL_PREC_COMPLEX, FT_EXT_PREC_COMPLEX, FT_STRING,
	FT_FIXED_DECIMAL, FT_FLOAT_DECIMAL, FT_BYTE, FT_UNSIGNED_BYTE,
	FT_TEMPLATE_ARG, FT_DECFLOAT, FT_DBL_PREC_DECFLOAT,
	FT_EXT_PREC_DECFLOAT, FT_NUM_MEMBERS): Remove macros.
	* objfiles.c (struct objfile): Remove fundamental_types member.
	* symfile.c (reread_symbols): Do not clear fundamental_types.

	* language.h (struct language_defn): Remove la_fund_type member.
	(create_fundamental_type): Remove.
	* language.c (unk_lang_create_fundamental_type): Remove.
	(unknown_language_defn, auto_language_defn,
	local_language_defn): Adapt initializer.
	* ada-lang.c (ada_create_fundamental_type): Remove.
	(ada_language_defn): Adapt initializer.
	* c-lang.h (c_create_fundamental_type): Remove prototype.
	* c-lang.c (c_create_fundamental_type): Remove.
	(c_language_defn, cplus_language_defn, asm_language_defn,
	minimal_language_defn): Adapt initializer.
	* f-lang.c (f_create_fundamental_type): Remove.
	(f_language_defn): Adapt initializer.
	* jv-lang.c (java_create_fundamental_type): Remove.
	(java_language_defn): Adapt initializer.
	* m2-lang.c (m2_create_fundamental_type): Remove.
	(m2_language_defn): Adapt initializer.
	* objc-lang.c (objc_create_fundamental_type): Remove.
	(objc_language_defn): Adapt initializer.
	* p-lang.h (pascal_create_fundamental_type): Remove prototype.
	* p-lang.c (pascal_create_fundamental_type): Remove.
	(pascal_language_defn): Adapt initializer.
	* scm-lang.c (scm_language_defn): Adapt initializer.
2007-12-04 23:33:00 +00:00
Ian Lance Taylor abaa399568 Print symbol table statistics with --stats. 2007-12-04 23:11:35 +00:00
Alan Modra fd4980a3b8 daily update 2007-12-04 23:00:05 +00:00
Ben Elliston 5584c8417c 2007-11-26 Thiago Jung Bauermann <bauerman@br.ibm.com>
* Makefile.in (decimal32.o): Prepend $(srcdir) to dependencies
	and substitute $< for the source file in compilation command.
	(decimal64.o): Likewise.
	(decimal128.o): Likewise.
	(bid2dpd_dpd2bid.o): Likewise.
	(host-ieee32.o): Likewise.
	(host-ieee64.o): Likewise.
	(host-ieee128.o): Likewise.
2007-12-04 22:54:32 +00:00
Bob Wilson c243ad3b81 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Create DT_PLTGOT
entry for all dynamic objects.
2007-12-04 22:41:59 +00:00
Maciej W. Rozycki 3966e1906c * features/mips-cpu.xml: Specify "regnum" for "r0" explicitly.
* features/mips64-cpu.xml: Likewise.
* features/mips-fpu.xml: Specify "regnum" for "f0" explicitly.
* features/mips64-fpu.xml: Likewise.
* features/mips-linux.c: Regenerate.
* features/mips64-linux.c: Regenerate.
2007-12-04 15:41:46 +00:00
Maciej W. Rozycki 4becf47ce7 * target.h (target_find_new_threads): Fix definition. 2007-12-04 14:15:01 +00:00
Alan Modra b8e2249147 * elf32-spu.c (spu_elf_size_stubs): Correct section alignment. 2007-12-04 03:29:43 +00:00
Ian Lance Taylor 3ae7da37eb From Craig Silverstein: Use gold_fatal in options.h, beef up value checks. 2007-12-04 01:30:46 +00:00
gdbadmin 05d2fc7dc1 *** empty log message *** 2007-12-04 00:00:03 +00:00
Alan Modra a7dd7d0572 * readelf.c (is_32bit_abs_reloc, is_32bit_pcrel_reloc): Add SPU. 2007-12-03 23:19:25 +00:00
Alan Modra d13d401589 * config/tc-ppc.c (ppc_tc): Allow a space between toc symbol
name and bracket.
2007-12-03 23:14:24 +00:00
Alan Modra dade8b53ef daily update 2007-12-03 23:00:05 +00:00
Pedro Alves d97903b290 * win32-low.c (attaching): New global.
(win32_create_inferior): Clear the `attaching' global.
	(win32_attach): Set the `attaching' global.
	(get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
	attaching.  Only set a breakpoint at the entry point if not
	attaching.
2007-12-03 01:42:06 +00:00
Pedro Alves 311de42358 * server.c (main): Don't report dll events on the initial
connection on attaches.
2007-12-03 01:38:09 +00:00
Pedro Alves 6c2d16d2d3 * server.c (main): Relax numerical bases supported for the pid of
the --attach command line argument.
2007-12-03 01:34:09 +00:00
Pedro Alves 5ca906e670 * win32-low.c (win32_attach): Call OpenProcess before
DebugActiveProcess, not after.  Add last error output to error
	call.
2007-12-03 01:30:59 +00:00
Pedro Alves 9c6c819469 * win32-low.c (win32_get_thread_context)
(win32_set_thread_context): New functions.
	(thread_rec): Use win32_get_thread_context.
	(continue_one_thread, win32_resume): Use win32_set_thread_context.
	* win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
	field.
2007-12-03 01:27:19 +00:00
Pedro Alves 4d5d1aaa19 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
global variables.
	(child_add_thread): Minor cleanup.
	(child_continue): Resume artificially suspended threads before
	calling ContinueDebugEvent.
	(suspend_one_thread): New.
	(fake_breakpoint_event): New.
	(get_child_debug_event): Change return type to int.  Check here if
	gdb sent an interrupt request.  If a soft interrupt was requested,
	fake a breakpoint event.  Return 0 if there is no event to handle,
	and 1 otherwise.
	(win32_wait): Don't check here if gdb sent an interrupt request.
	Ensure there is a valid event to handle.
	(win32_request_interrupt): Add soft interruption method as last
	resort.
2007-12-03 01:18:49 +00:00
Pedro Alves c436e841ff * win32-low.h (win32_thread_info): Add descriptions to the
structure members.  Replace `suspend_count' counter by a
	`suspended' flag.
	* win32-low.c (thread_rec): Update condition of when to get the
	context from the inferior.  Rely on ContextFlags being set if it
	has already been retrieved.  Only suspend the inferior thread if
	we haven't already.  Warn if that fails.
	(continue_one_thread): s/suspend_count/suspended/.  Only call
	ResumeThread once.  Warn if that fails.
2007-12-03 01:10:30 +00:00
gdbadmin 0421e13edb *** empty log message *** 2007-12-03 00:00:32 +00:00
Pedro Alves e7b5fa67ed * win32-low.c (win32_wait): Don't read from the inferior when it
has already exited.
2007-12-02 23:40:17 +00:00
Pedro Alves a385171d78 * Makefile.in (win32_low_h): New variable.
(win32-low.o): Add dependency on $(win32_low_h).
	(win32-arm-low.o, win32-i386-low.o): New rules.
2007-12-02 23:33:26 +00:00
Alan Modra f7ad6d7c9b daily update 2007-12-02 23:00:05 +00:00
Pierre Muller 677d7bec62 2007-12-02 Pierre Muller <muller@ics.u-strasbg.fr>
* win32-nat.c (win32_resume): Set the trace bit
	in the thread identified by inferior_ptid.
2007-12-02 21:32:46 +00:00
Christopher Faylor bf25528d6b *win32-nat.c (open_process_used): New static variable.
(win32_init_thread_list): Remove call to CloseHandle for thread.
(win32_delete_thread): Ditto.
(fake_create_process): Set open_process_used if OpenProcess call is successful.
(get_win32_debug_event): Do not close process handle.
(do_initial_win32_stuff): Set open_process_used to zero.
(win32_mourn_inferior): Call CloseHandle for current_process_handle if
open_process_used is set.
(win32_kill_inferior): Do not close process and main_thread handles.
2007-12-02 05:45:08 +00:00
gdbadmin c0bfb684f7 *** empty log message *** 2007-12-02 00:00:03 +00:00
Alan Modra ddf5dad8e6 daily update 2007-12-01 23:00:05 +00:00
Ian Lance Taylor be00d4e7ff More -fPIC options. 2007-12-01 06:53:32 +00:00
Ian Lance Taylor 763277c3c4 Add missing space. 2007-12-01 06:51:45 +00:00
Ian Lance Taylor c92003e082 Compile shared library code with -fPIC. Also, alphabetize. 2007-12-01 06:50:09 +00:00
Ian Lance Taylor ae3e2ab146 Add casts to avoid warnings. 2007-12-01 06:45:21 +00:00
Ian Lance Taylor 96803768f1 Compress all debug sections. 2007-12-01 06:34:12 +00:00
Daniel Jacobowitz f80c84b330 * hostio.c: Correct copyright year. 2007-12-01 05:00:04 +00:00
gdbadmin c5525f9399 *** empty log message *** 2007-12-01 00:00:03 +00:00
Bob Wilson ee6365aa9e gas/
* config/tc-xtensa.h (md_allow_eh_opt): Define.
gas/testsuite/
	* gas/elf/elf.exp: Disable ehopt test for Xtensa.
2007-11-30 23:47:55 +00:00
Alan Modra 542162ebce daily update 2007-11-30 23:00:06 +00:00
Ian Lance Taylor b589a5bc29 From Cary Coutant: Avoid compilation warnings if no zlib.h. 2007-11-30 22:38:01 +00:00
Daniel Jacobowitz a6b151f187 * remote.c (remote_cmdlist): New variable.
(PACKET_vFile_open, PACKET_vFile_pread, PACKET_vFile_pwrite)
	(PACKET_vFile_close, PACKET_vFile_unlink): New constants.
	(remote_buffer_add_string, remote_buffer_add_bytes)
	(remote_buffer_add_int, remote_hostio_parse_result)
	(remote_hostio_send_command, remote_hostio_open, remote_hostio_pwrite)
	(remote_hostio_pread, remote_hostio_close, remote_hostio_unlink)
	(remote_fileio_errno_to_host, remote_hostio_error, fclose_cleanup)
	(remote_hostio_close_cleanup, remote_file_put, remote_file_get)
	(remote_file_delete, remote_put_command, remote_get_command)
	(remote_delete_command, remote_command): New functions.
	(_initialize_remote): Register new packets and commands.
	* Makefile.in (gdb_fileio_h): New variable.
	(remote.o): Update.
	(SUBDIR_MI_OBS): Add mi-cmd-target.o.
	(SUBDIR_MI_SRCS): Add mi/mi-cmd-target.c.
	(mi-cmd-target.o): New rule.
	* mi/mi-cmd-target.c: New file.
	* mi/mi-cmds.c (mi_cmds): Add target-file-delete, target-file-get,
	and target-file-put.
	* mi/mi-cmds.h (mi_cmd_target_file_get, mi_cmd_target_file_put)
	(mi_cmd_target_file_delete): Declare.
	* remote.h (remote_file_put, remote_file_get, remote_file_delete):
	Declare.
	* NEWS: Describe new file transfer support.

	* gdb.texinfo (Debugging Programs with Multiple Processes): Correct
	formatting.
	(Remote Debugging): Add File Transfer section.
	(Remote Configuration): Document Host I/O packets.
	(GDB/MI): Add GDB/MI File Transfer Commands section.
	(Remote Protocol): Add Host I/O Packets section.
	(Packets): Add vFile.

	* Makefile.in (OBS): Add hostio.o.
	(hostio.o): New rule.
	* server.h (handle_vFile): Declare.
	* hostio.c: New file.
	* server.c (handle_v_requests): Take packet_len and new_packet_len
	for binary packets.  Call handle_vFile.
	(main): Update call to handle_v_requests.

	* gdb.server/file-transfer.exp, gdb.server/transfer.txt,
	gdb.mi/mi-file-transfer.exp: New.
2007-11-30 21:50:19 +00:00
Vladimir Prus fba57f8f38 * infrun.c (handle_inferior_event): Don't
ignore beakpoints if trap_expected is set.
2007-11-30 10:03:16 +00:00
Vladimir Prus e236ba4424 Make insert_breakpoints return void.
* breakpoint.h (insert_breakpoints): Change
	return type to void.
	* breakpoint.c (insert_breakpoints): Change
	return type to void.  Rename local return_val
	variable to error.
	* infrun.c (keep_going): Instead of checking
	return value from insert_breakpoints, catch exception.
2007-11-30 10:00:26 +00:00
Richard Sandiford 888cab3722 bfd/
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use the
	ELF header to choose between 32-bit and 64-bit relocation structures.
2007-11-30 09:01:35 +00:00
Ian Lance Taylor 9a0910c33e From Craig Silverstein: Add support for compressing .debug_str section. 2007-11-30 00:35:27 +00:00
gdbadmin 71195202df *** empty log message *** 2007-11-30 00:00:33 +00:00
Alan Modra bd80e2618a daily update 2007-11-29 23:00:05 +00:00
Ian Lance Taylor 27bc2bce09 Clean up setting address and section offset. 2007-11-29 20:10:17 +00:00