Commit Graph

76554 Commits

Author SHA1 Message Date
Tom Tromey ccde22c0a4 * symtab.c (symbol_init_cplus_specific, symbol_set_demangled_name):
Take an obstack, not an objfile.
	(symbol_set_names): Update.
	* symtab.h (symbol_set_demangled_name): Update.
2013-04-08 19:53:18 +00:00
Tom Tromey e623cf5da2 * coffread.c (process_coff_symbol, coff_read_enum_type): Call
allocate_symbol.
	* dwarf2read.c (fixup_go_packaging): Call allocate_symbol.
	(read_func_scope): Call allocate_template_symbol.
	(new_symbol_full): Call allocate_symbol.
	* jit.c (finalize_symtab): Call allocate_symbol.
	* jv-lang.c (add_class_symbol): Call allocate_symbol.
	* mdebugread.c (parse_symbol, new_block): Call allocate_symbol.
	* stabsread.c (patch_block_stabs, define_symbol, read_enum_type)
	(common_block_end): Call allocate_symbol.
	* symtab.c (allocate_symbol, initialize_symbol)
	(allocate_template_symbol): New functions.
	* symtab.c (allocate_symbol, initialize_symbol)
	(allocate_template_symbol): Declare.
	* xcoffread.c (process_xcoff_symbol): Call initialize_symbol.
2013-04-08 19:48:30 +00:00
Jan Beulich 5f77db5271 gas/testsuite/
2013-04-08  Jan Beulich <jbeulich@suse.com>

	* gas/i386/x86-64-opcode.s: Flesh out LOOP and J*CXZ sections.
	Correct comments in Jcc section.
	* gas/i386/x86-64-opcode.d: Refresh.
	* gas/i386/ilp32/x86-64-opcode.d: Refresh.

opcodes/
2013-04-08  Jan Beulich <jbeulich@suse.com>

	* i386-opc.tbl: Fold 64-bit and non-64-bit jecxz entries.
	* i386-tbl.h: Re-generate.
2013-04-08 15:48:38 +00:00
Tom Tromey 4337774fc8 * dwarf.c (process_debug_info): Check dwarf_cutoff_level. 2013-04-08 14:59:04 +00:00
Tom Tromey 2e97048ab2 * dwarf-mode.el: Bump version number.
(dwarf-mode): Remove autoload.
	(dwarf-die-reference): Relax regexp.
2013-04-08 14:56:28 +00:00
Pedro Alves f6de8ec262 create_breapoint / explicit mode: Error out if there's garbage after the breakpoint location.
If !PARSE_CONDITION_AND_THREAD, then ARG is just the location, nothing
else.  The fact that the describing comment of create_breakpoint
doesn't mention this just looks like an oversight of when extra_string
was added.  "parse_condition_and_thread" has been a misnomer ever
since extra_string was added -- better rename it avoid more confusion.
This makes it "parse_arg", as that'll remain stable even if/when more
explicit parameters are added.

gdb/
2013-04-08  Pedro Alves  <palves@redhat.com>
	    Keith Seitz  <keiths@redhat.com>

	* breakpoint.c (create_breakpoint): Rename
	"parse_condition_and_thread" parameter to "parse_arg".  Update
	describing comment.  If !PARSE_ARG, then error out if ARG is not
	the empty string after extracting the location.
	* breakpoint.h (create_breakpoint): Rename
	"parse_condition_and_thread" parameter to "parse_arg".

gdb/testsuite/
2013-04-08  Pedro Alves  <palves@redhat.com>

	* gdb.mi/mi-break.exp (test_error): Add tests with garbage after
	the location.
2013-04-08 14:09:30 +00:00
Aleksandar Ristovski f65ce5fb99 Add const to lm_addr_check.
* solib-svr4.c (lm_addr_check): Add const qualifier to 'so' arg.
2013-04-08 14:03:56 +00:00
Jan Beulich 94dcf8bfcd gas/
2013-04-08  Jan Beulich <jbeulich@suse.com>

	* gas/config/tc-arm.c (do_neon_ldr_str): Correct disgnostics for
	PC-relative VSTR.
2013-04-08 11:07:38 +00:00
Jan Beulich 1472d06fd6 gas/
2013-04-08  Jan Beulich <jbeulich@suse.com>

	* gas/config/tc-arm.c (reg_names): Convert duplicate SP_fiq
	entry to sp_fiq.
2013-04-08 11:06:30 +00:00
Ramana Radhakrishnan 6b5d81517f Handle big-endian for some aarch64 tests
2013-04-08  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	* ld-aarch64/gc-tls-relocs.d: Handle big endian format.
	* ld-aarch64/gc-got-relocs.d: Likewise.
2013-04-08 09:41:52 +00:00
Alan Modra 73f91bba7b daily update 2013-04-08 00:00:05 +00:00
gdbadmin 934335bf47 *** empty log message *** 2013-04-08 00:00:02 +00:00
Yao Qi cc5925ad7e gdb/
* remote.c (remote_trace_find): Change type of parameters 'addr1'
	and 'addr2' to CORE_ADDR.
	* target.c (update_current_target): Update.
	* target.h (struct target_ops) <to_trace_find>: Change parameter
	type to CORE_ADDR.
	* tracepoint.c (tfind_1): Change type of parameters 'addr1' and
	'addr2' to CORE_ADDR.
	(tfile_trace_find): Likewise.
	(tfile_get_traceframe_address): Change return type to CORE_ADDR.
	Change local variable 'addr' to type CORE_ADDR.
	* tracepoint.h (tfind_1): Update declaration.
2013-04-07 10:23:34 +00:00
Jan Kratochvil afe1492b21 gdb/doc/
* Makefile.in (gdb.1, gdbserver.1, gdbinit.5): Use $(srcdir).
2013-04-07 06:20:19 +00:00
Jan Kratochvil 0ed630cb00 gdb/doc/
* Makefile.in (install-man1, install-man5, uninstall-man1)
	(uninstall-man5): Replace $(MANS) by $(MAN1S) and $(MAN5S) respectively.
2013-04-07 06:04:58 +00:00
Jan Kratochvil 480b27bfaa gdb/gdbserver/
* Makefile.in (install-only): Fix make install regression.
2013-04-07 05:53:22 +00:00
Alan Modra fdcdfbe835 daily update 2013-04-07 00:00:06 +00:00
gdbadmin 4ebcdc5d1a *** empty log message *** 2013-04-07 00:00:03 +00:00
David S. Miller 0afd121540 Increase the accuracy of sparc instruction aliases.
Make current with UA2011 specification.

Add an F_PREFERRED opcode flag that indicates a preferred alias
when multiple aliases for the same opcode exists.

For 'lzd':

	Add 'lzcnt' as primary instruction, and make 'lzd' an alias.

Add 'ldtw', 'ldtwa', 'sttw', 'sttwa':

	The modern opcode for for 'ldd', 'ldda', 'std', and 'stda' on
	integer registers.  Mark the latter now as aliases.

For 'flush':

	Support "[address]" syntax as well as plain "address".

Rework 'mov' aliases for 'wr':

	Eliminate bogus three operand moves, and encode the
	instructions properly for the "mov REG, %ASR" cases,
	specifically we should encode the register in rs2 not rs1 as
	per The SPARC V8 Architecture Manual.

Add missing cbcond aliases:

	c{w,x}bz, c{w,x}blu, c{w,x}bnz, c{w,x}bgeu

Add 'd' suffix VIS logical ops:

	The primary opcode for 'fzero' is now 'fzerod' (compare with
	'fzeros'), for example.  And thus 'fzero' is now an alias.

Add modern opcodes for condition code setting edge instructions:

	They are now edgeN{,l}cc instead of plain edgeN{,l}.

Add modern opcodes for VIS comparisons:

	All VIS comparisons now start with prefix "fp", retain the
	older variants as aliases.

	The signed variants for equal and not-equal have "u" aliases
	to show that these comparisons are equally suited for unsigned
	compares.

Update existing test cases as needed, and add several new ones.

include/opcode/

	* sparc.h (F_PREFERRED): Define.
	(F_PREF_ALIAS): Define.

opcodes/

	* sparc-dis.c (compare_opcodes): When encountering multiple aliases
	of an opcode, prefer the one with F_PREFERRED set.
	* sparc-opc.c (sparc_opcodes): Add ldtw, ldtwa, sttw, sttwa,
	lzcnt, flush with '[address]' syntax, and missing cbcond pseudo
	ops.  Make 64-bit VIS logical ops have "d" suffix in their names,
	mark existing mnenomics as aliases.  Add "cc" suffix to edge
	instructions generating condition codes, mark existing mnenomics
	as aliases.  Add "fp" prefix to VIS compare instructions, mark
	existing mnenomics as aliases.

gas/testsuite/

	* gas/sparc/cbcond.s: Add tests for new opcode aliases.
	* gas/sparc/cbcond.d: Updated.
	* gas/sparc/hpcvis3.s: Add tests for new opcode aliases.
	* gas/sparc/hpcvis3.d: Updated.
	* gas/sparc/v8-movwr-imm.d: Fix expected disassembly.
	* gas/sparc/edge.s: New test.
	* gas/sparc/edge.d: Expected disassembly.
	* gas/sparc/flush.s: New test.
	* gas/sparc/flush.d: Expected disassembly.
	* gas/sparc/ldd_std.s: New test.
	* gas/sparc/ldd_std.d: Expected disassembly.
	* gas/sparc/ldtw_sttw.s: New test.
	* gas/sparc/ldtw_sttw.d: Expected disassembly.
	* gas/sparc/sparc.exp: Run new tests.
2013-04-06 22:22:03 +00:00
Jan Kratochvil cba5a7bf0f gdb/doc/
* Makefile.in (POD2MAN1, POD2MAN5): Replace $(VERSION) by ../version.in.
2013-04-06 15:52:06 +00:00
Jan Kratochvil 5b8b6385be gdb/doc/
* gdb.texinfo (gdbserver man): Rename tty to comm.  Swap --attach
	parameters order.  Remove "On some targets" for --attach.  Document the
	--multi parameter and extended-remote command.  Document all the
	options.
2013-04-06 08:58:53 +00:00
Eli Zaretskii d9ac066415 Unbreak Windows-hosted cross debugger builds.
* windows-nat.c (windows_get_absolute_argv0): Move from here...
	* mingw-hdep.c (windows_get_absolute_argv0): ...to here.
	Include main.h.

	* windows-nat.h (windows_get_absolute_argv0): Move prototype from
	here...
	* main.h (windows_get_absolute_argv0): ...to here.
2013-04-06 06:52:06 +00:00
Alan Modra 198f1157c9 * elf32-ppc.c (ppc_elf_check_relocs): Use SYMBOLIC_BIND.
* elf64-ppc.c (ppc64_elf_check_relocs, dec_dynrel_count): Likewise.
2013-04-06 06:44:45 +00:00
gdbadmin 524d4a957a *** empty log message *** 2013-04-06 00:00:03 +00:00
Alan Modra ed67aad39d daily update 2013-04-05 23:00:05 +00:00
Doug Evans 02142a6c8b * dwarf2read.c (struct dwarf2_per_objfile): Tweak comment.
(read_cutu_die_from_dwo): Add comments.
	(read_structure_type): Update comment.
	(read_enumeration_type, read_namespace_type): Update comment.
	(read_die_type, get_die_type_at_offset, get_die_type): Update comment.
2013-04-05 21:48:25 +00:00
Jan Kratochvil 906ccdf016 gdb/doc/
* gdb.texinfo (gdb man): Mention option -p.  Include Fortran to
	the list of supported languages.
2013-04-05 20:02:58 +00:00
Jan Kratochvil 43662968f1 gdb/
Convert man pages to texinfo, new gdbinit.5 texinfo page.
	* Makefile.in (gdb.z): Remove.
	(install-only): Remove $(man1dir) and gdb.1 installation.
	* gdb.1: Remove.

gdb/gdbserver/
	Convert man pages to texinfo, new gdbinit.5 texinfo page.
	* Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
	installation.
	* gdbserver.1: Remove.

gdb/doc/
	Convert man pages to texinfo, new gdbinit.5 texinfo page.
	* Makefile.in (mandir, man1dir, man5dir, SYSTEM_GDBINIT, MANCONF,
	(TEXI2POD, POD2MAN1, POD2MAN5, MAN1S, MAN5S, MANS, man): New.
	(diststuff): Add man.
	(install-man, install-man1, install-man5, uninstall-man, uninstall-man1)
	(uninstall-man5): New.
	(STAGESTUFF): Add *.1 and *.5.
	(GDBvn.texi): Add SYSTEM_GDBINIT.
	(gdb.1, gdbserver.1, gdbinit.5): New.
	(maintainer-clean realclean): Add $(MANS).
	(install): Add install-man.
	(uninstall): Add uninstall-man.
	* gdb.texinfo (@include gdb-cfg.texi): Wrap it by @c man begin INCLUDE.
	(@copying): Wrap it by @c man begin COPYRIGHT.
	(Top): Add Man Pages.
	(Man Pages, gdb man, gdbserver man, gdbinit man): New.
2013-04-05 20:01:33 +00:00
Jan Kratochvil 9ead1b844c gdb/
Fix compatibility with Linux kernel 3.8.3.
	* linux-tdep.c (linux_find_memory_regions_full): Move variable number
	to more inner block.  Remove parsing of NUMBER from outer block.
	Parse NUMBER only if KEYWORD has been identified.
2013-04-05 19:17:15 +00:00
Jan Kratochvil d1794952ba gdb/
Fix variable name shadowing.
	* linux-tdep.c (linux_find_memory_regions_full): Rename outer variable
	filename to mapsfilename and update its uses.
2013-04-05 19:14:44 +00:00
Eli Zaretskii 9025569e3a Avoid warning in "make tags".
* Makefile.in (TAGS): Avoid warning from etags when $GDB_NM_FILE is
	empty.  See http://sourceware.org/ml/gdb-patches/2012-08/msg00504.html
	and http://sourceware.org/ml/gdb-patches/2013-04/msg00055.html for
	details of the problem.
2013-04-05 13:24:24 +00:00
Nick Clifton c69ba956e3 * elflink.c (elf_link_add_object_symbols): Revert accidental commit. 2013-04-05 09:08:28 +00:00
Alan Modra 952781e82c PR binutils/15324
* configure.in: Add strnlen to AC_CHECK_DECLS, sort.
	* dwarf.c (strnlen): Provide fallback decl.
	* config.in: Regnerate.
	* configure: Regenerate.
2013-04-05 04:13:41 +00:00
gdbadmin 4b7654eed7 *** empty log message *** 2013-04-05 00:00:02 +00:00
Alan Modra a50dfa9282 daily update 2013-04-04 23:00:05 +00:00
Sandra Loosemore b8abfd5827 2013-04-04 Sandra Loosemore <sandra@codesourcery.com>
gdb/testsuite/

	* gdb.cp/cplabel.exp: Allow empty directory in file reported
	for breakpoint location.
2013-04-04 21:01:40 +00:00
Sandra Loosemore 156bffd096 2013-04-04 Sandra Loosemore <sandra@codesourcery.com>
gdb/testsuite/

	* gdb.linespec/linespec.exp: Make dir/file:line tests
	conditional for non-remote hosts only.
2013-04-04 20:59:12 +00:00
Pedro Alves c9a6ce02b5 tracepoint->step_count fixes
If a tracepoint's actions list includes a while-stepping action, and
then the actions are changed to a list without any while-stepping
action, the tracepoint's step_count will be left with a stale value.
For example:

 (gdb) trace subr
 Tracepoint 1 at 0x4004d9: file ../../../src/gdb/testsuite//actions-changed.c, line 31.
 (gdb) actions
 Enter actions for tracepoint 1, one per line.
 End with a line saying just "end".
 >collect $reg
 >end
 (gdb) set debug remote 1
 (gdb) tstart
 Sending packet: $QTinit#59...Packet received: OK
 Sending packet: $QTDP:1:00000000004004d9:E:0:0-#a3...Packet received: OK
 Sending packet: $QTDP👎00000000004004d9:R03FFFFFFFFFFFFFFFFFF#2b...Packet received: OK
 (gdb) tstop
 Sending packet: $QTStop#4b...Packet received: OK
 Sending packet: $QTNotes:#e8...Packet received: OK
 (gdb) actions
 Enter actions for tracepoint 1, one per line.
 End with a line saying just "end".
 >collect $reg
 >while-stepping 1
   >collect $reg
   >end
 >end
 (gdb) tstart
 Sending packet: $QTinit#59...Packet received: OK
 Sending packet: $QTDP:1:00000000004004d9:E:1:0-#a4...Packet received: OK
 Sending packet: $QTDP👎00000000004004d9:R03FFFFFFFFFFFFFFFFFF-#58...Packet received: OK
 Sending packet: $QTDP👎00000000004004d9:SR03FFFFFFFFFFFFFFFFFF#7e...Packet received: OK
 (gdb) tstop
 Sending packet: $QTStop#4b...Packet received: OK
 Sending packet: $QTNotes:#e8...Packet received: OK
 (gdb) actions
 Enter actions for tracepoint 1, one per line.
 End with a line saying just "end".
 >collect $regs
 >end
 (gdb) tstart
 Sending packet: $QTinit#59...Packet received: OK
 Sending packet: $QTDP:1:00000000004004d9:E:1:0-#a4...Packet received: OK
 Sending packet: $QTDP👎00000000004004d9:R03FFFFFFFFFFFFFFFFFF#2b...Packet received: OK

The last "$QTDP:1:00000000004004d9:E:1:0-#a4" should be "$QTDP:1:00000000004004d9:E:0:0-#a3".
In pseudo-diff:

  -$QTDP:1:00000000004004d9:E:1:0-#a4
  +$QTDP:1:00000000004004d9:E:0:0-#a3

A related issue is that the "commands" command actually supports
setting commands to a range of breakpoints/tracepoints at once.  But,
hacking "maint info breakpoints" to print t->step_count, reveals:

 (gdb) trace main
 Tracepoint 5 at 0x45a2ab: file ../../src/gdb/gdb.c, line 29.
 (gdb) trace main
 Note: breakpoint 5 also set at pc 0x45a2ab.
 Tracepoint 6 at 0x45a2ab: file ../../src/gdb/gdb.c, line 29.
 (gdb) commands 5-6
 Type commands for breakpoint(s) 5-6, one per line.
 End with a line saying just "end".
 > while-stepping 5
  >end
 > end
 (gdb) maint info breakpoints 5
 Num     Type           Disp Enb Address            What
 5       tracepoint     keep y   0x000000000045a2ab in main at ../../src/gdb/gdb.c:29 inf 1
         step_count=5
         ^^^^^^^^^^^^
         while-stepping 5
         end
         not installed on target
 (gdb) maint info breakpoints 6
 Num     Type           Disp Enb Address            What
 6       tracepoint     keep y   0x000000000045a2ab in main at ../../src/gdb/gdb.c:29 inf 1
         step_count=0
         ^^^^^^^^^^^^
         while-stepping 5
         end
         not installed on target
 (gdb)

that tracepoint 6 doesn't end up with the correct step_count.

The issue is that here:

 static void
 do_map_commands_command (struct breakpoint *b, void *data)
 {
  struct commands_info *info = data;

  if (info->cmd == NULL)
    {
      struct command_line *l;

      if (info->control != NULL)
	l = copy_command_lines (info->control->body_list[0]);
      else
	{
	  struct cleanup *old_chain;
	  char *str;

	  str = xstrprintf (_("Type commands for breakpoint(s) "
			      "%s, one per line."),
			    info->arg);

	  old_chain = make_cleanup (xfree, str);

	  l = read_command_lines (str,
				  info->from_tty, 1,
				  (is_tracepoint (b)
				   ? check_tracepoint_command : 0),
				  b);

	  do_cleanups (old_chain);
	}

      info->cmd = alloc_counted_command_line (l);
    }

validate_actionline is never called for tracepoints other than the
first (the copy_command_lines path).  Right below, we have:

  /* If a breakpoint was on the list more than once, we don't need to
     do anything.  */
  if (b->commands != info->cmd)
    {
      validate_commands_for_breakpoint (b, info->cmd->commands);
      incref_counted_command_line (info->cmd);
      decref_counted_command_line (&b->commands);
      b->commands = info->cmd;
      observer_notify_breakpoint_modified (b);
    }

And validate_commands_for_breakpoint looks like the right place to put
a call; if we reset step_count there too, we have a nice central fix
for the first issue as well, because trace_actions_command calls
breakpoint_set_commands that also calls
validate_commands_for_breakpoint.

We end up calling validate_actionline twice for the first tracepoint,
since read_command_lines calls it too, through
check_tracepoint_command, but that should be harmless.

2013-04-04  Pedro Alves  <palves@redhat.com>
	    Hui Zhu  <hui@codesourcery.com>

	* breakpoint.c (validate_commands_for_breakpoint): If validating a
	tracepoint, reset its STEP_COUNT and call validate_actionline.

2013-04-04  Stan Shebs  <stan@codesourcery.com>
	    Pedro Alves  <palves@redhat.com>

	* gdb.trace/Makefile.in (PROGS): Add actions-changed.
	* gdb.trace/actions-changed.c: New file.
	* gdb.trace/actions-changed.exp: New file.
	* lib/trace-support.exp (gdb_trace_setactions): Rename to ...
	(gdb_trace_setactions_command): ... this.  Add "actions_command"
	parameter, and handle it.
	(gdb_trace_setactions, gdb_trace_setcommands): New procedures.
2013-04-04 19:22:38 +00:00
Ian Lance Taylor 54a3d86564 GCC PR c++/56840
* object.cc (do_layout_deferred_sections): Handle .eh_frame
	sections before checking whether they are included in the link.
2013-04-04 16:49:04 +00:00
Alan Modra e65cb106a6 * ld-elf/shared.exp: Update regexp on --no-add-needed and
--no-copy-dt-needed-entries tests.
2013-04-04 14:51:48 +00:00
Alan Modra 8ff4c1f3c9 * ldlang.c (load_symbols): Report "error adding symbols" on
bfd_link_add_symbols failure.
	* emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Likewise.
	* emultempl/sunos.em (gld${EMULATION_NAME}_after_open): Likewise.
	(gld${EMULATION_NAME}_try_needed): Likewise.
2013-04-04 14:38:47 +00:00
Alan Modra ff5ac77bf5 * bfd.c (bfd_error_type, bfd_errmsgs): Add bfd_error_missing_dso.
* bfd-in2.h: Regenerate.
	* elflink.c (elf_link_add_object_symbols): Use new error.
2013-04-04 14:38:01 +00:00
Nick Clifton 86d27af662 oops - omitted from previous delta 2013-04-04 07:24:08 +00:00
Yao Qi 4bd05f2493 gdb/testsuite/
* gdb.server/server-kill.exp: Use command 'tstatus' instead of
	'step'.
2013-04-04 02:16:04 +00:00
DJ Delorie dcd7e9d6a5 merge from gcc 2013-04-04 01:03:01 +00:00
gdbadmin 9e1097d62d *** empty log message *** 2013-04-04 00:00:32 +00:00
Alan Modra 5bbdeca4e8 daily update 2013-04-03 23:00:04 +00:00
Doug Evans bf6af49608 * dwarf2read.c (read_die_and_siblings_1): Renamed from
read_die_and_siblings.
	(read_die_and_siblings): New function.
	(read_cutu_die_from_dwo): Dump die if requested.
	(read_die_and_children): Call read_full_die_1 and
	read_die_and_siblings_1.
	(read_full_die): Dump die if requested.

	* dwarf2read.c (read_comp_units_from_section): Add debugging printf.
2013-04-03 19:45:00 +00:00
Doug Evans 0ac5b59e25 * dwarf2read.c (struct dwo_file): New member comp_dir.
Rename member name to dwo_name.  All uses updated.
	(hash_dwo_file): Include comp_dir in computation.
	(eq_dwo_file): Ditto.
	(lookup_dwo_file_slot): New arg comp_dir.  All callers updated.
	(create_dwo_in_dwp, lookup_dwo_in_dwp, open_and_init_dwo_file): Ditto.
2013-04-03 19:11:01 +00:00
Doug Evans 5ff888ce0e * psymtab.c (read_psymtabs_with_fullname): Don't call
psymtab_to_fullname if the basenames are different.
2013-04-03 18:48:54 +00:00