Commit Graph

31465 Commits

Author SHA1 Message Date
gdbadmin c886f0b40c *** empty log message *** 2012-10-24 00:00:02 +00:00
Mark Kettenis 274bd0009d * gdb.base/callfuncs.exp: PR gdb/12796, gdb/12798 and gdb/12800
are now fixed.
2012-10-23 18:25:25 +00:00
Mark Kettenis 7f7930dd88 PR gdb/12796
PR gdb/12798
PR gdb/12800
* amd64-tdep.h (enum amd64_regnum): Add AMD64_ST1_REGNUM and
AMD64_FTAG_REGNUM.
* amd64-tdep.c (amd64_classify): Classify complex types.
(amd64_return_value): Handle the COMPLEX_X87 class.
2012-10-23 18:16:55 +00:00
Yao Qi 545f743d64 gdb/testsuite:
* gdb.base/info-os.exp: Resume the inferior until it exits.
2012-10-23 15:49:11 +00:00
Joel Brobecker 38a69d0a4d Change target-wide-charset to UTF-16 on ppc-aix.
On ppc-aix, type wchar_t is 2 bytes long, so override the default
target-wide-charset (UTF-32) with UTF-16. This allows us to print
wide characters correctly.

gdb/ChangeLog:

        * rs6000-aix-tdep.c (rs6000_aix_auto_wide_charset): New function.
        (rs6000_aix_init_osabi): Set auto_wide_charset gdbarch method.
2012-10-23 15:37:21 +00:00
Joel Brobecker 83ab93c6ea Set default target-wide-charset setting to "UTF-16" for x86_64-windows.
Type wchar_t is only 2 bytes long on x86_64-windows.

gdb/ChangeLog:

        * amd64-windows-tdep.c (amd64_windows_auto_wide_charset): New
        function.
        (amd64_windows_init_abi): Set auto_wide_charset gdbarch method
        to amd64_windows_auto_wide_charset.
2012-10-23 15:37:03 +00:00
Yao Qi f6fbab7d1b gdb/
* event-top.c (mark_async_signal_handler_wrapper): Remove.
	* event-top.h: Remove its declaration.
	(async_request_quit): Call mark_async_signal_handler instead of
	mark_async_signal_handler_wrapper.
	(async_do_nothing, async_disconnect): Likewise.
	(async_stop_sig): Likewise.
	* remote.c (handle_remote_sigint): Likewise.
	(handle_remote_sigint_twice): Likewise.
2012-10-23 06:20:49 +00:00
Yao Qi 05fa925168 gdb/
* event-top.c (sigint_token, sighup_token): Replace 'void *'
	with 'static struct async_signal_handler *'.
	(sighup_token, sigquit_token, sigstp_token): Likewise.
2012-10-23 06:12:04 +00:00
gdbadmin e92e81f4b8 *** empty log message *** 2012-10-23 00:00:33 +00:00
Ali Anwar 08af7a403c Ali Anwar <ali_anwar@codesourcery.com>
* gdbarch.sh (function_list): Use 'pstring' when printing a
	variable which could return NULL.
	* gdbarch.c: Regenerate.
2012-10-22 13:35:43 +00:00
gdbadmin 94dc4eaff7 *** empty log message *** 2012-10-22 00:00:33 +00:00
gdbadmin 2cce1bffff *** empty log message *** 2012-10-21 00:00:03 +00:00
gdbadmin 4a43d85f8c *** empty log message *** 2012-10-20 00:00:04 +00:00
Joel Brobecker beb4b03cbe ppc-aix osabi sniffer: Turn test of bfd flavour into assertion
Due to the way this function is registers, we know that given bfd's
flavour should always be bfd_target_xcoff_flavour, thus making
the former test always true, which means that this function should
always return GDB_OSABI_AIX, and never return GDB_OSABI_UNKNOWN.

This patch also fixes a typo detected by Tom Tromey that caused
the test itself to be completely ineffective.

gdb/ChangeLog (by Tom Tromey and Joel Brobecker):

        * rs6000-aix-tdep.c (rs6000_aix_osabi_sniffer): Replace
        inneffective if condition by gdb assertion.  Add function
        description comment.
2012-10-19 19:58:18 +00:00
Joel Brobecker a5b1262727 Document exp_descriptor.op_name should never return NULL.
This documents a constaint that struct exp_descriptor's "op_name"
method implementation should obey.  This might not have been part
of the initial design, but is currently true of all instantiations,
and already assumed by the current users.

gdb/ChangeLog:

        * parser-defs.h (struct exp_descriptor): Document constraint
        on return value for "op_name" callbacks.
2012-10-19 19:55:56 +00:00
xuepeng guo 99c7d5a823 Correct my ChangeLog entry 2012-10-19 07:50:20 +00:00
xuepeng guo 48b56b6a3e * gdb.base/ctxobj.exp: Skip if skip_shlib_tests returns true.
* gdb.base/print-file-var.exp: Likewise.
        * gdb.base/type-opaque.exp: Likewise.
2012-10-19 07:36:19 +00:00
gdbadmin 4493bd46ff *** empty log message *** 2012-10-19 00:00:03 +00:00
Tom Tromey 0b0865da62 * tracepoint.c (print_one_static_tracepoint_marker): Constify.
* symtab.c (iterate_over_some_symtabs): Constify.
	* source.h (symtab_to_fullname): Return 'const char *'.
	* source.c (symtab_to_fullname): Return 'const char *'.
	* python/py-symtab.c (stpy_fullname): Constify.
	* cli/cli-cmds.c (edit_command): Constify.
	* breakpoint.c (print_breakpoint_location)
	(update_static_tracepoint): Constify.
2012-10-18 20:14:45 +00:00
Tom Tromey 94b0e70d0c * breakpoint.c (compare_breakpoints): Fix comparison. 2012-10-18 20:12:21 +00:00
Tom Tromey fff106847e * valprint.c (generic_emit_char, generic_printstr): Pass size of
gdb_wchar_t to convert_between_encodings.
2012-10-18 15:26:01 +00:00
gdbadmin 522307fe68 *** empty log message *** 2012-10-18 00:00:32 +00:00
Yao Qi 8de0566d7a gdb:
* breakpoint.c (invalidate_bp_value_on_memory_change): Add one
	more parameter 'inferior'.
	* corefile.c (write_memory_with_notification): Caller update.

	* mi/mi-cmd-var.c: Include "mi-main.h".
	(mi_cmd_var_assign): Set mi_suppress_notification.data_write_memory
	to 1 and restore it later.
	* mi/mi-cmds.c (mi_cmd mi_cmds): Update for "data-write-memory"
	and "data-write-memory-bytes.
	* mi/mi-interp.c: Include objfiles.h.
	(mi_interpreter_init): Call observer_attach_memory_changed.
	(mi_memory_changed): New.
	* mi/mi-main.h (struct mi_suppress_notification) <memory>:
	New field.

	* NEWS: Mention new MI notification "memory-changed".

gdb/doc:

	* observer.texi (GDB Observers): Update observer
	'memory_changed'.
	* gdb.texinfo (GDB/MI Async Records): Document for
	"memory-changed" notification.

gdb/testsuite:

	* gdb.mi/mi-memory-changed.exp: New.
2012-10-17 00:53:24 +00:00
gdbadmin b1fecbf125 *** empty log message *** 2012-10-17 00:00:33 +00:00
Yao Qi 448835468f gdb/testsuite/
* gdb.reverse/solib-precsave.exp: Skip if skip_shlib_test
	returns true.
	Call gdb_load_shlibs.
	* gdb.reverse/solib-reverse.exp: Likewise.
2012-10-16 13:14:36 +00:00
Jan Kratochvil 6235cdd10c gdb/
* dwarf2loc.c (dwarf_expr_reg_to_entry_parameter): Remove comment.
2012-10-16 08:46:58 +00:00
gdbadmin 49cf4c5b60 *** empty log message *** 2012-10-16 00:00:33 +00:00
Keith Seitz 345f514a93 * lib/cp-support.exp (cp_test_ptype_class): Add support
for class typedefs.

	* gdb.cp/derivation.exp: Add tests for g_instance.
2012-10-15 22:32:50 +00:00
Doug Evans 07540c156d New option -nh: inhibit loading of ~/.gdbinit.
* NEWS: Mention -nh.
	* main.c (captured_main): Recognize and process -nh.
	(print_gdb_help): Mention -nh.
	* gdb.1: Mention -nh.  Remove erroneous docs on -nx behavior.

	doc/
	* gdb.texinfo (Mode Options): Document -nh.
	Elaborate on docs for -nx.
2012-10-15 21:45:04 +00:00
H.J. Lu eab09350a3 Remove sp_regnum_from_eax and pc_regnum_from_eax
PR backtrace/14646
	PR gdb/14647
	* i386-tdep.h (gdbarch_tdep): Remove sp_regnum_from_eax and
	pc_regnum_from_eax.
	* i386-tdep.c (i386_gdbarch_init): Don't use sp_regnum_from_eax
	nor pc_regnum_from_eax.
	* amd64-tdep.c (amd64_x32_init_abi): Don't set sp_regnum_from_eax
	nor pc_regnum_from_eax.
2012-10-15 20:37:39 +00:00
Jan Kratochvil 9e3a7d65fb gdb/
Fix entry values resolving in inlined frames.
	* dwarf2loc.c (dwarf_expr_reg_to_entry_parameter): Move func_addr,
	gdbarch and caller_frame initialization later.  Skip INLINE_FRAME
	entries of FRAME.

gdb/testsuite/
	Fix entry values resolving in inlined frames.
	* gdb.arch/amd64-entry-value-inline.S: New file.
	* gdb.arch/amd64-entry-value-inline.c: New file.
	* gdb.arch/amd64-entry-value-inline.exp: New file.
2012-10-15 19:15:57 +00:00
Jan Kratochvil 21a7b08989 gdb/testsuite/
Fix recent gdb_breakpoint regression.
	* gdb.java/jmisc.exp: gdb_breakpoint for $function - remove curly
	braces from the parameter.
	* gdb.java/jprint.exp: Likewise.
2012-10-15 19:11:56 +00:00
Doug Evans 2c47921e64 * lib/gdb.exp (runto): Fix call to gdb_breakpoint. 2012-10-15 17:35:54 +00:00
Joel Brobecker 89398707cd Remove trailing '#' in gdb.dwarf2/dw2-icc-opaque.S
gdb/testsuite/ChangeLog:

        * gdb.dwarf2/dw2-icc-opaque.S: Remove '#'.
2012-10-15 17:26:14 +00:00
Joel Brobecker c83393b9a8 Build with -DMS_WIN64 on amd64-windows if Python enabled...
... and building with GCC.

gdb/ChangeLog:

        * configure.ac: Build with -DMS_WIN64 if building with Python
        enabled using GCC on amd64-windows.
        * configure: Regenerate.
2012-10-15 17:17:54 +00:00
Tom Tromey 801e418523 PR python/14635:
* python/py-symtab.c (del_objfile_sal): Set 'symtab' field
	to Py_None.
testsuite
	* gdb.python/py-symtab.exp: Test sal and symtab destructors.
2012-10-15 15:23:47 +00:00
Tom Tromey 74f910c87c PR python/14634:
* python/py-symbol.c (sympy_dealloc): Check for NULL symbol.
testsuite
	* gdb.python/py-symbol.exp: Test symbol destructor.
2012-10-15 15:20:27 +00:00
gdbadmin 864562f620 *** empty log message *** 2012-10-15 00:00:33 +00:00
Yao Qi 91567807f8 gdb/testsuite/
* gdb.mi/mi2-cli.exp: Move to mi-cli.exp.
	* gdb.mi/mi-cli.exp: New.

	* gdb.mi/mi2-basics.exp: Remove.
	* gdb.mi/mi2-break.exp: Remove.
	* gdb.mi/mi2-console.exp: Remove.
	* gdb.mi/mi2-disassemble.exp: Remove.
	* gdb.mi/mi2-eval.exp: Remove.
	* gdb.mi/mi2-file.exp: Remove.
	* gdb.mi/mi2-hack-cli.exp: Remove.
	* gdb.mi/mi2-pthreads.exp: Remove.
	* gdb.mi/mi2-read-memory.exp: Remove.
	* gdb.mi/mi2-regs.exp: Remove.
	* gdb.mi/mi2-return.exp: Remove.
	* gdb.mi/mi2-simplerun.exp: Remove.
	* gdb.mi/mi2-stack.exp: Remove.
	* gdb.mi/mi2-stepi.exp: Remove.
	* gdb.mi/mi2-syn-frame.exp: Remove.
	* gdb.mi/mi2-until.exp: Remove.
	* gdb.mi/mi2-watch.exp: Remove.
	* gdb.mi/mi2-var-block.exp: Remove.
	* gdb.mi/mi2-var-cmd.exp: Remove.
	* gdb.mi/mi2-var-display.exp: Remove.
2012-10-14 12:24:08 +00:00
gdbadmin 088aad051f *** empty log message *** 2012-10-14 00:00:03 +00:00
gdbadmin 5d973135d4 *** empty log message *** 2012-10-13 00:00:32 +00:00
Yao Qi 8733202903 gdb/testsuite/
* gdb.mi/mi-breakpoint-changed.exp (test_pending_resolved): Remove
	trail '.*' on matching patterns.
2012-10-12 00:02:23 +00:00
gdbadmin 299f893db6 *** empty log message *** 2012-10-12 00:00:33 +00:00
Andrew Burgess 2a7c8fd5b4 http://sourceware.org/ml/gdb-patches/2012-10/msg00032.html
gdb/ChangeLog

        * remote-sim.c (gdbsim_create_inferior): Call init_thread_list to
        reset thread numbering back to 1.
2012-10-11 21:25:18 +00:00
H.J. Lu 11fc905705 Use is_x86_like_target to check x86 targets
* gdb.arch/i386-bp_permanent.exp: Skip if not is_x86_like_target.
	* gdb.arch/i386-cfi-notcurrent.exp: Likewise.
	* gdb.arch/i386-disp-step.exp: Likewise.
	* gdb.arch/i386-gnu-cfi.exp: Likewise.
	* gdb.arch/i386-prologue.exp: Likewise.
	* gdb.arch/i386-size-overlap.exp: Likewise.
	* gdb.arch/i386-size.exp: Likewise.
	* gdb.arch/i386-unwind.exp: Likewise.
2012-10-11 17:42:58 +00:00
H.J. Lu 7d46bcdc05 Check byte/word registers on x86_64
* gdb.arch/i386-byte.exp: Remove is_ilp32_target check.
	* gdb.arch/i386-word.exp: Likewise.
2012-10-11 17:41:33 +00:00
H.J. Lu 31224d9db8 Check is_amd64_regs_target to to set nr_regs
* gdb.arch/i386-avx.exp: Check is_amd64_regs_target instead of
	is_ilp32_target to set nr_regs.
	* gdb.arch/i386-sse.exp: Likewise.
2012-10-11 17:40:30 +00:00
Doug Evans 7c09e5a0f7 PR breakpoints/14643.
* linespec.c (struct ls_parser): New member keyword_ok.
	(linespec_lexer_lex_string): Add comment.
	(linespec_lexer_lex_one): Ignore keywords if it's the wrong place
	for one.
	(parse_linespec): Set keyword_ok.

	testsuite/
	* gdb.linespec/ls-errs.exp: Change tests of "b if|task|thread".
	* gdb.linespec/thread.c: New file.
	* gdb.linespec/thread.exp: New file.
2012-10-11 16:12:05 +00:00
Doug Evans 5b7d00507b * lib/gdb.exp (gdb_breakpoint): Fix varargs scan.
Recognize "message" -> print pass and fail.  Add eof case.
	(runto): Recognize message, no-message.  Print pass/fail if requested,
	with same treatment as gdb_breakpoint.
	(runto_main): Pass no-message to runto.
	(gdb_internal_error_resync): Add log message.
	(gdb_file_cmd): Tweak internal error fail text for consistency.
2012-10-11 15:59:57 +00:00
Doug Evans 844226d69a * dwarf2read.c (process_psymtab_comp_unit_reader): Remove duplicate
"0x" prefix on address in log message.
2012-10-11 02:21:50 +00:00
Doug Evans a1855c1db0 * dwarf2read.c (read_1_byte): Add const to buf parameter.
(read_1_signed_byte, read_2_bytes, read_2_signed_bytes): Ditto.
	(read_4_bytes, read_4_signed_bytes, read_8_bytes): Ditto.
	(lookup_dwo_file): Add const to dwo_name parameter.
	(lookup_dwo_comp_unit, lookup_dwo_type_unit): Ditto.
2012-10-11 02:07:22 +00:00
gdbadmin 95883d846f *** empty log message *** 2012-10-11 00:00:32 +00:00
gdbadmin fd49b9b373 *** empty log message *** 2012-10-10 00:00:03 +00:00
gdbadmin 4d5f33b647 *** empty log message *** 2012-10-09 00:00:20 +00:00
gdbadmin c1d02113e8 *** empty log message *** 2012-10-08 00:00:33 +00:00
gdbadmin 126568efd0 *** empty log message *** 2012-10-07 00:00:32 +00:00
Jan Kratochvil 2e24f4aab7 gdb/
Fix crash during stepping on ppc32.
	* ppc-linux-tdep.c (powerpc_linux_in_dynsym_resolve_code): Test NULL
	SYM.

gdb/testsuite/
	Fix crash during stepping on ppc32.
	* gdb.base/step-symless.c: New file.
	* gdb.base/step-symless.exp: New file.
2012-10-06 21:10:33 +00:00
gdbadmin 355fed6729 *** empty log message *** 2012-10-06 00:00:02 +00:00
gdbadmin 8ba8064654 *** empty log message *** 2012-10-05 00:00:02 +00:00
gdbadmin 95d958a2bf *** empty log message *** 2012-10-04 00:00:03 +00:00
Doug Evans aa14df2525 PR symtab/14601
* buildsym.c (buildsym_init): Reset using_directives to NULL.

	testsuite/
	* gdb.cp/using-crash.exp: New file.
	* gdb.cp/using-crash.cc: New file.
2012-10-03 17:05:00 +00:00
gdbadmin 159f5996f2 *** empty log message *** 2012-10-03 00:00:03 +00:00
Andrew Burgess 3d46829657 http://sourceware.org/ml/gdb-patches/2012-10/msg00027.html
gdb/ChangeLog

        * remote-sim.c (dump_mem): Always dump buffer contents, zero fill
        output and use uint32_t not long to ensure 4 byte size.
2012-10-02 21:52:43 +00:00
Doug Evans 975531dbc9 * lib/gdb.exp (gdb_unload): Change wording of perror text to be
more consistent.
	(runto,gdb_debug_format): Ditto.
	(gdb_file_cmd): Watch for eof in nested gdb_expect.
	Clean up logging and error messages.
2012-10-02 17:17:45 +00:00
Joel Brobecker 8f0ee2eb7c gdb_bfd_unref failed assertion on AIX.
Trying to run any program on AIX triggers a failed assertion:

    (gdb) run
    Starting program: /[...]/simple_main
    /[...]/gdb_bfd.c:288: internal-error: gdb_bfd_unref: Assertion `gdata->refc >= 1' failed.
    A problem internal to GDB has been detected,
    further debugging may prove unreliable.
    Quit this debugging session? (y or n)

What happens is that we have a loop where we forgot to update
the value of "last", resulting in the loop unref'ing the same
BFD over and over again. We bomb the second time around, when
triggering an assertion on the ref counter.

gdb/ChangeLog:

        * rs6000-nat.c (add_vmap): Set "last" to "next" after having
        unref'ed it.
2012-10-02 15:05:42 +00:00
gdbadmin 547c8182c5 *** empty log message *** 2012-10-02 00:00:33 +00:00
Andrew Burgess b3dc46ff7c http://sourceware.org/ml/gdb-patches/2012-09/msg00568.html
gdb/ChangeLog

        * target.c (simple_search_memory): Include access length in
        warning message.

gdb/gdbserver/ChangeLog

        * server.c (handle_search_memory_1): Include access length in
        warning message.

gdb/testsuite/ChangeLog

        Test find command on unmapped memory.
        * gdb.base/find-unmapped.c: New file.
        * gdb.base/find-unmapped.exp: New file.
2012-10-01 12:02:13 +00:00
gdbadmin f7b660e280 *** empty log message *** 2012-10-01 00:00:02 +00:00
gdbadmin 09f503ee78 *** empty log message *** 2012-09-30 00:00:03 +00:00
Yao Qi 45814d4572 gdb/testsuite/
* gdb.trace/mi-tracepoint-changed.exp: New.
	* gdb.mi/mi-breakpoint-changed.exp: New.
	* gdb.mi/pending.c, gdb.mi/pendshr1.c: New
	* gdb.mi/pendshr2.c: New.
2012-09-29 00:03:56 +00:00
gdbadmin 2d8066705f *** empty log message *** 2012-09-29 00:00:05 +00:00
Edjunior Barbosa Machado f712f01fdf 2012-09-28 Nathan Miller <nathanm2@us.ibm.com>
Edjunior Machado  <emachado@linux.vnet.ibm.com>

	PR gdb/13989
	* solib.c (solib_find): Prevent GDB from loading native libraries when
	debugging a cross-target corefile.
2012-09-28 20:20:08 +00:00
Pedro Alves 39181896f1 2012-09-28 selven <pcthegreat@gmail.com>
Make definition match declaration.

	* regcache.c (regcache_register_status): Change return type to
	enum register_status.
2012-09-28 12:04:28 +00:00
Yao Qi 4c2786ba1e gdb/
* mi/mi-main.c (mi_cmd_data_write_memory): Call
	write_memory_with_notification instead of write_memory.
	(mi_cmd_data_write_memory_bytes): Call write_memory_with_notification
	instead of target_write_memory.

gdb/testsuite/
	* gdb.mi/pr11022.exp: New.
	* gdb.mi/pr11022.c: New.  Copied from gdb.base/.
2012-09-28 00:39:18 +00:00
Yao Qi 1ae0c35e7e gdb/
* mi/mi-main.c (mi_cmd_data_write_memory_bytes): Emit error
	when the length of content is not an even number.
2012-09-28 00:25:24 +00:00
gdbadmin 8b1a6dc45d *** empty log message *** 2012-09-28 00:00:02 +00:00
Tom Tromey 7977e5d2a6 Fix https://bugzilla.redhat.com/show_bug.cgi?id=849357
* cp-valprint.c (cp_print_value_fields): Use get_vptr_fieldno.
gdb/testsuite
	* gdb.cp/derivation.exp: Add regression test.
	* gdb.cp/derivation.cc (class V_base, class V_inter, class
	V_derived): New.
	(vderived): New global.
2012-09-27 16:04:23 +00:00
Joel Brobecker 807160da3c sol-thread.c: Remove commented-out code.
gdb/ChangeLog:

        * sol-thread.c (sol_thread_fetch_registers)
        (sol_thread_store_registers): Delete commented out code.
2012-09-27 12:53:57 +00:00
Joel Brobecker 43c75337b6 New unit sparc-sol-thread.c extracted from sol-thread.c
Moving some sparc-specific routines out of sol-thread.c into their
own (new) file.

gdb/ChangeLog:

        * sol-thread.c (ps_lgetxregsize, ps_lgetxregs, ps_lsetxregs):
        Move these functions to sparc-sol-thread.c.
        * sparc-sol-thread.c: New file.
        * configure.ac: Add sparc-sol-thread.o to CONFIG_OBS and
        sparc-sol-thread.c to CONFIG_SRCS for sparc-solaris native
        configurations.
        * configure: Regenerate.
2012-09-27 12:53:44 +00:00
Joel Brobecker d292a9723d sol-thread.c: Remove #if 0-ed code.
gdb/ChangeLog:

        * sol-thread.c (ps_lgetxregsize, ps_lgetxregs, ps_lsetxregs):
        Remove commented-out code.
2012-09-27 12:53:13 +00:00
Joel Brobecker 8c3da00317 sol-thread.c: conditionalize some sparc-specific libthread_db functions.
gdb/ChangeLog:

        * sol-thread.c (ps_lgetxregsize, ps_lgetxregs, ps_lsetxregs):
        Enable this code for sparc hosts only.
2012-09-27 12:52:53 +00:00
Joel Brobecker f00482b603 Add procfs_find_LDT_entry declaration (procfs.h).
Add a declaration for procfs_find_LDT_entry in order to prevent
a compiler warning about this function missing one. This also
helps making sure that declaration and definition remain consistent.

gdb/ChangeLog:

        * procfs.h (procfs_find_LDT_entry): Add declaration.
        * sol-thread.c (ps_lgetLDT): Delete local declaration of
        function procfs_find_LDT_entry.
2012-09-27 12:52:10 +00:00
Joel Brobecker 337c776f02 Make procfs.c:proc_get_LDT_entry static
This function is not used outside of procfs.c.

gdb/ChangeLog:

        * procfs.c (proc_get_LDT_entry): Make static.
2012-09-27 12:51:57 +00:00
Joel Brobecker 1a04d88fbc Fix declaration of proc_find_memory_regions
This function is used as a target_ops callback. The function
implemention was recently changed, but the declaration wasn't
updated accordingly.

This fixes a build failure on Solaris.

gdb/ChangeLog:

        * procfs.c (proc_find_memory_regions): Fix declaration.
2012-09-27 12:51:40 +00:00
Siddhesh Poyarekar bad43aa52e * amd64-tdep.c (amd64_return_value): Revert previous change
that used TYPE_LENGTH directly.
        * bfin-tdep.c (bfin_extract_return_value): Likewise.
        (bfin_store_return_value): Likewise.
        * cris-tdep.c (cris_store_return_value): Likewise.
        (cris_extract_return_value): Likewise.
        * h8300-tdep.c (h8300_extract_return_value): Likewise.
        * hppa-tdep.c (hppa64_return_value): Likewise.
        * lm32-tdep.c (lm32_store_return_value): Likewise.
        * microblaze-tdep.c (microblaze_store_return_value): Likewise.
        * spu-tdep.c (spu_value_from_register): Likewise.
        * vax-tdep.c (vax_return_value): Likewise.
2012-09-27 10:40:01 +00:00
Siddhesh Poyarekar 63375b7438 * gdbtypes.c (lookup_array_range_type): Expand parameters
LOW_BOUND and HIGH_BOUND to LONGEST.
	(lookup_string_range_type): Likewise.
	* gdbtypes.h (lookup_array_range_type): Likewise.
	(lookup_string_range_type): Likewise.
	* valops.c (value_cstring): Expand parameter LEN to ssize_t.
	Expand HIGHBOUND to ssize_t.
	(value_string): Likewise.
	* value.h (value_cstring): Expand parameter LEN to ssize_t.
	(value_string): Likewise.
2012-09-27 08:57:16 +00:00
gdbadmin 8b627ae9fa *** empty log message *** 2012-09-27 00:00:02 +00:00
Yao Qi 19ca11c580 gdb/
PR breakpoints/13898
	* breakpoint.h (tracepoint_breakpoint_ops): Forward declaration.
	* mi/mi-cmd-break.c (mi_cmd_break_insert): Set breakpoint_ops
	per breakpoint type.
2012-09-26 23:53:53 +00:00
Pierre Muller 9210735600 * procfs.c: Add gdb_bfd header.
* rs6000-nat.c: Likewise.
	* solib-pa64.c: Likewise.
	* spu-linux-nat.c: Likewise.
	* windows-nat.c: Likewise.
2012-09-26 21:23:11 +00:00
Tom Tromey 9742094a45 * f-lang.h (BLANK_COMMON_NAME_LOCAL): Remove. 2012-09-26 19:58:18 +00:00
Tom Tromey 0971de02d5 * dwarf2read.c (mark_common_block_symbol_computed): New function.
(read_common_block): Handle child DIEs with
	DW_AT_data_member_location.
	(new_symbol_full): Add special case for common blocks.
gdb/testsuite
	* gdb.dwarf2/dw2-common-block.S: New file.
	* gdb.dwarf2/dw2-common-block.exp: New file.
2012-09-26 19:50:13 +00:00
Tom Tromey 4357ac6c6f 2012-09-26 Jan Kratochvil <jan.kratochvil@redhat.com>
Tom Tromey  <tromey@redhat.com>
	* dwarf2read.c (read_common_block): Rewrite.
	(new_symbol_full): Handle DW_TAG_common_block.
	* f-lang.c (head_common_list, find_common_for_function):
	Remove.
	* f-lang.h (struct common_entry, struct saved_f77_common,
	SAVED_F77_COMMON, SAVED_F77_COMMON_PTR, COMMON_ENTRY,
	COMMON_ENTRY_PTR, head_common_list, find_common_for_function,
	BLANK_COMMON_NAME_LOCAL): Remove.
	(struct common_block): New.
	* f-valprint.c (list_all_visible_commons): Remove.
	(info_common_command_for_block): New function.
	(info_common_command): Use it.
	* stack.c (iterate_over_block_locals): Special case for
	COMMON_BLOCK_DOMAIN.
	* symtab.h (enum domain_enum_tag) <COMMON_BLOCK_DOMAIN>: New
	constant.
	(struct general_symbol_info) <value.common_block>: New field.
	(SYMBOL_VALUE_COMMON_BLOCK): New define.
gdb/testsuite
2012-09-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
	* gdb.fortran/common-block.exp: New file.
	* gdb.fortran/common-block.f90: New file.
2012-09-26 19:38:32 +00:00
Tom Tromey 965f07a88d 2012-09-26 Jan Kratochvil <jan.kratochvil@redhat.com>
Tom Tromey  <tromey@redhat.com>

	* f-lang.c (allocate_saved_bf_node,
	allocate_saved_function_node, allocate_saved_f77_common_node,
	allocate_common_entry_node, tail_common_list, current_common,
	saved_bf_list, saved_bf_list_end, current_head_bf_list,
	tmp_bf_ptr, add_common_block, add_common_entry,
	find_first_common_named, patch_common_entries,
	patch_all_commons_by_name, ADD_BF_SYMNUM, clear_bf_list,
	global_remote_debug, get_bf_for_fcn, saved_function_list,
	saved_function_list_end, clear_function_list, struct saved_fcn,
	struct saved_bf_symnum, SAVED_FUNCTION, SAVED_FUNCTION_PTR,
	SAVED_BF, SAVED_BF_PTR): Remove.
	* f-lang.h (tail_common_list, current_common,
	UNINITIALIZED_SECNUM, COMMON_NEEDS_PATCHING,
	BLANK_COMMON_NAME_ORIGINAL, BLANK_COMMON_NAME_MF77,
	DEFAULT_UPPER_BOUND, DEFAULT_LOWER_BOUND, real_main_name,
	real_main_c_value): Remove.
	* f-valprint.c (there_is_a_visible_common_named): Remove.
2012-09-26 19:05:09 +00:00
Andrew Burgess 6f380991ba http://sourceware.org/ml/gdb-patches/2012-09/msg00403.html
gdb/ChangeLog

        * breakpoint.c (update_global_location_list): Ignore previous
        duplicate status of a breakpoint when starting a new scan for
        duplicate breakpoints.

gdb/testsuite/ChangeLog

        * gdb.base/duplicate-bp.c: New file.
        * gdb.base/duplicate-bp.exp: New file.
2012-09-26 16:36:00 +00:00
Karthik Bhat 8b3d5494ef Adding PR number tp ChangeLog 2012-09-26 14:15:53 +00:00
Yao Qi 2536b51cfc Fix changelog format. 2012-09-26 13:45:46 +00:00
Karthik Bhat 9ead7ae4a2 * arm-tdep.c (arm_skip_prologue): Extending producer check to support LLVM compiler. 2012-09-26 12:14:30 +00:00
Siddhesh Poyarekar 8f8a23a2c3 * amd64-tdep.c (amd64_return_value): Use TYPE_LENGTH directly.
* bfin-tdep.c (bfin_extract_return_value): Likewise.
        (bfin_store_return_value): Likewise.
        * cris-tdep.c (cris_store_return_value): Likewise.
        (cris_extract_return_value): Likewise.
        * h8300-tdep.c (h8300_extract_return_value): Likewise.
        * hppa-tdep.c (hppa64_return_value): Likewise.
        * lm32-tdep.c (lm32_store_return_value): Likewise.
        * microblaze-tdep.c (microblaze_store_return_value): Likewise.
        * spu-tdep.c (spu_value_from_register): Likewise.
        * vax-tdep.c (vax_return_value): Likewise.
2012-09-26 07:52:48 +00:00
Yao Qi 8ae551cf47 gdb/testsuite:
* gdb.mi/mi2-cli.exp:  Avoid line number in test summary.

	Revert:
	2012-09-21  Yao Qi  <yao@codesourcery.com>

	* gdb.mi/mi2-cli.exp: Remove redundant '\'.
2012-09-26 06:53:46 +00:00
Siddhesh Poyarekar d701958995 gdb/ChangeLog:
* breakpoint.c (invalidate_bp_value_on_memory_change): Expand
	parameter LEN to ssize_t.

gdb/doc/ChangeLog:

	observer.texi (memory_changed): Expand parameter LEN to ssize_t.
2012-09-26 02:06:55 +00:00
gdbadmin 5e5d3f22e4 *** empty log message *** 2012-09-26 00:00:33 +00:00
Siddhesh Poyarekar 744a805904 * ada-valprint.c (ada_val_print_1): Eliminate single-use
variable LEN.
	* alpha-tdep.c (alpha_extract_return_value): Use TYPE_LENGTH
	directly.
	(alpha_store_return_value): Likewise.
	* amd64-tdep.c (amd64_classify_aggregate): Likewise.
	(amd64_push_arguments): Likewise.
	* ax-gdb.c (gen_trace_static_fields): Likewise.
	(gen_traced_pop): Likewise.
	* bfin-tdep.c (bfin_push_dummy_call): Likewise.
	* breakpoint.c (update_watchpoint): Likewise.
	* findcmd.c (parse_find_args): Use local variable for type
	instead of length.
	* findvar.c (default_read_var_value): Use TYPE_LENGTH directly.
	* h8300-tdep.c (h8300h_extract_return_value): Likewise.
	(h8300_store_return_value): Likewise.
	* i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
	Use i386_darwin_arg_type_alignment directly.
	* infcall.c (call_function_by_hand): Use TYPE_LENGTH directly.
	* lm32-tdep.c (lm32_push_dummy_call): Likewise.
	* m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
	(m68hc11_extract_return_value): Likewise.
	* mep-tdep.c (mep_push_dummy_call): Likewise.
	* printcmd.c (float_type_from_length): Likewise.
	* s390-tdep.c (s390_value_from_register): Likewise.
	* stack.c (read_frame_arg): Likewise.
	* tracepoint.c (encode_actions_1): Likewise.
	* valops.c (value_fetch_lazy): Use local variable for type
	instead of length.  Use TYPE_LENGTH directly.
	* value.c (value_contents_equal): Use TYPE_LENGTH directly.
2012-09-25 12:48:53 +00:00
Joel Brobecker a4b411d69d Fix typo in skip_prologue_sal's comment.
gdb/ChangeLog:

        * symtab.c (skip_prologue_sal): Fix typo in comment.
2012-09-25 12:38:56 +00:00
Joel Brobecker 11dba07abb Fix ChangeLog entry order (merge error). 2012-09-25 12:23:25 +00:00
Joel Brobecker 2e47c6caff Small typo in comment inside create_sals_line_offset
gdb/ChangeLog:

        * linespec.c (create_sals_line_offset): Fix typo in comment.
2012-09-25 12:22:54 +00:00
Siddhesh Poyarekar 318102b961 gdb/ChangeLog:
* c-typeprint.c (c_type_print_varspec_suffix): Remove cast and
	use plongest to print the array size.

testsuite/ChangeLog:

	* gdb.base/longest-types.c: New test case.
	* gdb.base/longest-types.exp: New test case.
2012-09-25 12:20:42 +00:00
Yao Qi a1e5fd6938 gdb/testsuite:
* gdb.mi/mi2-cli.exp: Check breakpoint notification.
2012-09-25 00:55:15 +00:00
gdbadmin 6919373875 *** empty log message *** 2012-09-25 00:00:32 +00:00
Siddhesh Poyarekar b4aa388a20 * m2-typeprint.c (m2_enum): Expand LASTVAL to LONGEST.
* p-valprint.c (pascal_type_print_base): Likewise.
2012-09-24 10:25:09 +00:00
gdbadmin b6b05ca274 *** empty log message *** 2012-09-24 00:00:32 +00:00
gdbadmin 9d6943f97c *** empty log message *** 2012-09-23 00:00:33 +00:00
Yao Qi 84cebc4a97 gdb/testsuite/
* remote.c (remote_get_trace_status): Remove setting default
	values of fields of 'ts'.
2012-09-22 13:04:55 +00:00
gdbadmin 0ea4fdcfc2 *** empty log message *** 2012-09-22 00:00:05 +00:00
Jan Kratochvil 04e7407c59 gdb/
Fix internal error on canonicalization of clang types.
	* cp-name-parser.y (operator): New comment at make_operator call for
	new, delete, new[] and delete[].
	(exp): Use "sizeof ".  Add new comment at make_operator call.

gdb/testsuite/
	Fix internal error on canonicalization of clang types.
	* gdb.dwarf2/dw2-canonicalize-type.S: New file.
	* gdb.dwarf2/dw2-canonicalize-type.exp: New file.
	* lib/gdb.exp (gdb_file_cmd): Catch also GDB internal error.
2012-09-21 20:01:12 +00:00
Jan Kratochvil 9bf4bce984 gdb/
Fix disassemble without parameters in tailcall frame.
	* cli/cli-cmds.c (disassemble_current_function): Use
	get_frame_address_in_block.

gdb/testsuite/
	Fix disassemble without parameters in tailcall frame.
	* gdb.arch/amd64-entry-value.exp (down, disassemble): New tests.
2012-09-21 18:53:15 +00:00
Tom Tromey 1c5b7826c5 * c-typeprint.c (c_type_print_base) <TYPE_CODE_STRUCT,
TYPE_CODE_UNION>: Unify, removing a goto.
2012-09-21 17:37:47 +00:00
Tom Tromey 62a49610b8 * c-typeprint.c (cp_type_print_derivation_info): Fix comment. 2012-09-21 17:33:17 +00:00
Andrew Burgess 2603f7eeca http://sourceware.org/ml/gdb-patches/2012-08/msg00715.html
gdb/ChangeLog

        * findvar.c (read_frame_register_value): Mark the result value as
        optimized out if any of the input registers have been optimized out.

gdb/testsuite/ChangeLog

        * gdb.dwarf2/dw2-op-out-param.S: New file.
        * gdb.dwarf2/dw2-op-out-param.exp: New file.
2012-09-21 17:17:23 +00:00
Andreas Schwab 810849a34e * python/python.c (finalize_python): Only define if HAVE_PYTHON. 2012-09-21 12:57:34 +00:00
Yao Qi a3569abd1a gdb/testsuite:
* gdb.mi/mi2-cli.exp: Remove redundant '\'.
2012-09-21 12:26:30 +00:00
Siddhesh Poyarekar 0953dec1c5 * eval.c (evaluate_subexp_standard): Eliminate single-use
variable LOWER.
2012-09-21 09:24:41 +00:00
Yao Qi a065d7af0e gdb/testsuite:
* gdb.mi/mi-cli.exp: Remove.
	* gdb.mi/mi2-cli.exp: Merged from mi-cli.exp.
2012-09-21 08:39:08 +00:00
Yao Qi 15544bd96e gdb/testsuite:
* gdb.mi/mi-reverse.exp: Fix the typo in expected output of
	"=record-started" notification.
2012-09-21 07:29:46 +00:00
Yao Qi 82a90ccf2a gdb/doc:
2012-09-21  Yao Qi  <yao@codesourcery.com>
	    Pedro Alves  <palves@redhat.com>

	* gdb.texinfo (GDB/MI Async Records): Document notification
	'record-started' and 'record-stopped'.
	* observer.texi (GDB Observers): New observer 'record-changed'.
gdb:
2012-09-21  Yao Qi  <yao@codesourcery.com>

	* mi/mi-interp.c: Declare mi_record_changed.
	(mi_interpreter_init): Call observer_attach_record_changed.
	(mi_record_changed): New.
	* record.c (record_open): Call observer_notify_record_changed.
	(cmd_record_stop): Call observer_notify_record_changed.
	* NEWS: Mention it.

gdb/testsuite:
2012-09-21  Yao Qi  <yao@codesourcery.com>

	* gdb.mi/mi-record-changed.exp: New.
	* gdb.mi/mi-reverse.exp: Adjust expected output.
2012-09-21 01:46:46 +00:00
gdbadmin b3aea08323 *** empty log message *** 2012-09-21 00:00:03 +00:00
Tom Tromey d7de8e3ce9 * NEWS: Update.
* python/python.c (finalize_python): New function.
	(_initialize_python): Make a final cleanup.
testsuite
	* gdb.python/python.exp: Test atexit.register.
2012-09-20 20:54:11 +00:00
Doug Evans 05eade73e1 * boards/dwarf4-gdb-index.exp: New file. 2012-09-20 15:21:09 +00:00
Doug Evans 1aa9953770 * gdb.base/callfuncs.exp (do_function_calls): Set unwindonsignal to on
while running the tests.
2012-09-20 14:43:48 +00:00
gdbadmin c7446506ca *** empty log message *** 2012-09-20 00:00:32 +00:00
Doug Evans 43c7c83dac * buildsym.h (param_symbols): Delete, unused.
(context_stack): Delete member "params", unused.
	* buildsym.c (push_context): Update.
	* dwarf2read.c (read_func_scope): Update.
2012-09-19 20:06:47 +00:00
Thomas Schwinge a6521d9a4b gdb/
* sh-tdep.c (sh_register_convert_to_virtual)
	(sh_register_convert_to_raw): Add a gdbarch parameter.  Update
	all callers.  Just do a memcpy if not the little-endian case.
2012-09-19 11:10:54 +00:00
Thomas Schwinge f92589cba1 gdb/
* h8300-tdep.c (h8300_gdbarch_init): Invoke
	set_gdbarch_double_format and set_gdbarch_long_double_format.
	* m68hc11-tdep.c (m68hc11_gdbarch_init): Invoke
	set_gdbarch_double_format.
	* sh-tdep.c (sh_gdbarch_init): Likewise.
2012-09-19 11:09:16 +00:00
Thomas Schwinge aa9259cc84 gdb/
* NEWS: Document the removal of SH's 'regs' command.
	* sh-tdep.c (_initialize_sh_tdep): Remove the deprecated 'regs'
	command.

gdb/doc/
	* gdb.texinfo: Document the removal of SH's 'regs' command.
2012-09-19 11:07:01 +00:00
gdbadmin 91b96a45e3 *** empty log message *** 2012-09-19 00:00:32 +00:00
Sergio Durigan Junior c1d780c2c7 gdb/ChangeLog:
2012-09-18  Sergio Durigan Junior  <sergiodj@redhat.com>

	* infcmd.c (_initialize_infcmd): Register `j' as an alias for
	`jump'.

gdb/doc/ChangeLog:
2012-09-18  Sergio Durigan Junior  <sergiodj@redhat.com>

	* gdb.texinfo (jump): Mention new alias `j' for `jump'.
2012-09-18 20:14:56 +00:00
Joel Brobecker 4ae24af054 wrong language used when re-setting breakpoint
The debugger sometimes fails to re-set a breakpoint as follow,
causing it to become disabled:

    (gdb) b nested_sub
    Breakpoint 1 at 0x401cec: file foo.adb, line 7.
    (gdb) b do_nothing
    Breakpoint 2 at 0x401cdc: file pck.adb, line 4.
    (gdb) run
    Starting program: /[...]/foo
    Error in re-setting breakpoint 1: Function "nested_sub" not defined.

    Breakpoint 2, pck.do_nothing () at pck.adb:4
    4             null;

This only happens on machines where the debug-file-directory is
a valid directory name.

The reason behind the error is that the linespec code that re-sets
the breakpoints uses the current_language global when iterating
over a symtab's symbols. However, the that global gets switched from
Ada to C during the startup phase, probably as a side-effect of stopping
in some system code for which debugging info is available. The fix
is to make sure that we use the correct language.

gdb/ChangeLog:

        * linespec.c (iterate_over_all_matching_symtabs): Use the correct
        language when iterating over symbols.

gdb/testsuite/ChangeLog:

        * gdb.ada/bp_reset: New testcase.
2012-09-18 16:52:19 +00:00
Yao Qi bb25a15c8f gdb/doc:
* gdb.texinfo (GDB/MI Async Records): Document new MI
	notifications '=tsv-created' and '=tsv-deleted'.
	* observer.texi (GDB Observers): New observer tsv_created and
	tsv_deleted.

gdb:

	* mi/mi-interp.c: Declare mi_tsv_created and mi_tsv_deleted.
	(mi_interpreter_init): Call observer_attach_tsv_created and
	observer_attach_tsv_deleted.
	(mi_tsv_created, mi_tsv_deleted): New.
	* tracepoint.c (delete_trace_state_variable): Call
	observer_notify_tsv_deleted.
	(trace_variable_command): Call observer_notify_tsv_created.
	(delete_trace_variable_command): Call
	observer_notify_tsv_deleted.
	(create_tsv_from_upload): Call observer_notify_tsv_created.
	* NEWS: Mention it.

gdb/testsuite:

	gdb.trace/mi-tsv-changed.exp: New.
2012-09-18 12:09:28 +00:00
Yao Qi 201b4506b3 gdb/doc:
* observer.texi (GDB Observers): New observer 'traceframe_changed'.
	* gdb.texinfo (GDB/MI Async Records): Mention new MI notification
	'=traceframe-changed'.

gdb:

	* tracepoint.c (tfind_1): Call observer_notify_traceframe_changed
	if traceframe changed.

	* mi/mi-cmds.c (mi_cmd mi_cmds): Adjust for command
	"trace-find".
	* mi/mi-interp.c: Declare 'mi_traceframe_changed'.
	(mi_interpreter_init): Hook mi_traceframe_changed to observer
	'traceframe_changed'.
	(mi_traceframe_changed): New.
	* mi/mi-main.h (struct mi_suppress_notification) <traceframe>:
	New field.

	* NEWS: Mention the new MI notification.

gdb/testsuite:

	* gdb.trace/mi-traceframe-changed.exp: New.
2012-09-18 11:33:43 +00:00
gdbadmin 6bf93ee509 *** empty log message *** 2012-09-18 00:00:32 +00:00
Mike Wrighton 42b5c53d91 Moved the Changelog entries for breakpoint.c and remote.c out of Changelog
and into gdb/Changelog.
2012-09-17 20:39:13 +00:00
Mike Wrighton 6fb8dd83d6 Correcting error in gdb/Changelog from previous commit. 2012-09-17 19:29:52 +00:00
Mike Wrighton eaeb12dba0 Updated gdb/Changelog:
* MAINTAINERS (Write After Approval): Add "Mike Wrighton".
2012-09-17 19:16:48 +00:00
Jan Kratochvil 6e3c039e9c gdb/
* common/linux-ptrace.c: Change __i386__ to __i386__ || __x86_64__.
	(linux_ptrace_test_ret_to_nx): Extend comment for x86_64.  Change
	__i386__ to __i386__ || __x86_64__. Extend code also for __x86_64__.
	Extend code also for PaX support.  Convert all gdb_assert to warning
	calls.
2012-09-17 18:27:58 +00:00
Jan Kratochvil 9a950c7c83 gdb/
Implement auto-load user conveniences suggested by Doug Evans.
	* auto-load.c: Include top.h.
	(file_is_auto_load_safe): New variable advice_printed.  Print advice.
	(_initialize_auto_load): New variable scripts_directory_help.  Mention
	GDBPY_AUTO_FILE_NAME and GDB_AUTO_FILE_NAME for set auto-load
	scripts-directory.  Document in online help one can use also files for
	set auto-load safe-path.
	* python/py-auto-load.c: (GDBPY_AUTO_FILE_NAME): Move it from here ...
	* python/python.h (GDBPY_AUTO_FILE_NAME): ... to here.
2012-09-17 18:26:06 +00:00
Mike Wrighton fe91d94c37 Adding Mike Wrighton to gdb/MAINTAINERS. 2012-09-17 14:26:29 +00:00
Siddhesh Poyarekar deec9a9d32 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused definition
of LEN.
2012-09-17 09:41:12 +00:00
Siddhesh Poyarekar 354ecfd5f7 * m2-valprint.c (m2_print_array_contents): Eliminate variable
ELTLEN and use TYPE_LENGTH directly.
	(m2_val_print): Likewise.
	* m68k-tdep.c (m68k_svr4_extract_return_value): Eliminate
	variable LEN and use TYPE_LENGTH directly.
	(m68k_svr4_store_return_value): Likewise.
	* mips-tdep.c (mips_o32_push_dummy_call): Eliminate variable
	ARGLEN and use TYPE_LENGTH directly.
	(mips_o64_push_dummy_call): Likewise.
	* s390-tdep (s390_function_arg_pass_by_reference): Eliminate
	variable LENGTH and use TYPE_LENGTH directly.
	(s390_function_arg_float): Likewise.
	(s390_function_arg_integer): Likewise.
	(s390_push_dummy_call): Likewise.
	(s390_return_value_convention): Likewise.
	* spu-tdep.c (spu_push_dummy_call): Eliminate LEN and use
	TYPE_LENGTH directly.
2012-09-17 08:52:18 +00:00
Yao Qi 6fc1c7733e gdb/
* cli/cli-decode.c (add_setshow_zuinteger_unlimited_cmd): New.
	Update comment to add_setshow_integer_cmd.
	* cli/cli-setshow.c (do_set_command): Handle case
	'var_zuinteger_unlimited'.
	(do_show_command): Likewise.
	* cli/cli-cmds.c (init_cmds): Call add_setshow_zuinteger_unlimited_cmd
	for command 'remotetimeout'.
	* command.h (enum var_types): New zuinteger_unlimited.  Update comment
	to var_integer.
	* source.c (_initialize_source): Call add_setshow_zuinteger_unlimited_cmd
	for command 'set listsize'.

gdb/doc/
	* gdb.texinfo (List): Describe the meaning of 0 and -1 in
	'set listsize'.

gdb/testsuite/
	* gdb.base/list.exp (set_listsize): Don't set arg to "unlimited"
	when it is less than 0.
2012-09-17 08:42:14 +00:00
Siddhesh Poyarekar 6acef6cd7b * infrun.c (restore_infcall_suspend_state): Eliminate single-use
variable LEN.
2012-09-17 07:26:55 +00:00
Jan Kratochvil 1ab3b62c9d gdb/
PR 14119
	* frame.c (skip_inlined_frames): Skip also TAILCALL_FRAME frames.
	(frame_pop): Drop also TAILCALL_FRAME frames.
	* infcmd.c (finish_command): Ignore also TAILCALL_FRAME frames.

gdb/testsuite/
	PR 14119
	* gdb.arch/amd64-tailcall-ret.S: New file.
	* gdb.arch/amd64-tailcall-ret.c: New file.
	* gdb.arch/amd64-tailcall-ret.exp: New file.
	* gdb.reverse/amd64-tailcall-reverse.S: New file.
	* gdb.reverse/amd64-tailcall-reverse.c: New file.
	* gdb.reverse/amd64-tailcall-reverse.exp: New file.
2012-09-17 07:15:48 +00:00
Jan Kratochvil acf9414f48 gdb/
PR 14548
	* infrun.c (handle_inferior_event): Do not reverse-continue back to the
	function start if we are already at function start.  Both for
	reverse-next and for reverse-step into function without line number
	info.

gdb/testsuite/
	PR 14548
	* gdb.reverse/singlejmp-reverse-nodebug.S: New file.
	* gdb.reverse/singlejmp-reverse-nodebug.c: New file.
	* gdb.reverse/singlejmp-reverse.S: New file.
	* gdb.reverse/singlejmp-reverse.c: New file.
	* gdb.reverse/singlejmp-reverse.exp: New file.
2012-09-17 07:09:35 +00:00
Jan Kratochvil 193facb37d gdb/
Code cleanup - rename 'inline' depth to 'artificial' depth.
	* breakpoint.c (set_momentary_breakpoint): Rename at a caller to
	frame_id_artificial_p, extend the comment.
	* dwarf2-frame-tailcall.c (tailcall_frame_this_id): Rename at a user.
	* frame.c (fprint_frame_id): Rename at a user, change debug output
	text to "artificial=".
	(skip_inlined_frames): Rename to ...
	(skip_artificial_frames): ... here.  Extend the comment.
	(get_stack_frame_id, frame_unwind_caller_id): Rename at a caller.
	(frame_id_inlined_p): Rename to ...
	(frame_id_artificial_p): ... here.  Rename at a user.
	(frame_id_eq, frame_id_inner, frame_unwind_caller_pc)
	(frame_unwind_caller_pc_if_available, frame_unwind_caller_arch): Rename
	at a user.
	* frame.h (struct frame_id): Rename inline_depth to artificial_depth.
	Extend the comment.
	(frame_id_inlined_p): Rename to ...
	(frame_id_artificial_p): ... here.
	* inline-frame.c (inline_frame_this_id): Rename at a user.
2012-09-17 07:03:14 +00:00
gdbadmin 9386f15676 *** empty log message *** 2012-09-17 00:00:02 +00:00
Jan Kratochvil 666b578baa gdb/testsuite/
Fix compatibility with old GCC (~4.1).
	* gdb.cp/converts.cc (my_enum_var): New variable.
2012-09-16 17:30:48 +00:00
gdbadmin a82a73de34 *** empty log message *** 2012-09-16 00:00:04 +00:00
gdbadmin 428147f588 *** empty log message *** 2012-09-15 00:00:02 +00:00
Andrew Burgess 4205650181 http://sourceware.org/ml/gdb-patches/2012-09/msg00015.html
gdb/ChangeLog

        * c-typeprint.c (c_type_print_varspec_suffix): Display the size of
        vector variables using vector_size syntax rather than array
        syntax.

gdb/testsuite/ChangeLog

        * gdb.xml/tdesc-regs.exp: Update expected output for new
        vector_size syntax of vector types.
2012-09-14 21:23:45 +00:00
Siddhesh Poyarekar 84c47588d0 * valarith.c (value_concat): Replace unsafe ALLOCA with
XMALLOC/XFREE.
2012-09-14 12:46:55 +00:00
Pedro Alves f4045bcb61 2012-09-14 Pedro Alves <palves@redhat.com>
* gdb.1 (SEE ALSO): Expand pointer to GDB's Texinfo manual.
2012-09-14 12:10:23 +00:00
Yit Phang Khoo 63b4626663 Point contrib/cc-with-tweaks.sh to the build-local data-directory.
gdb/

	* contrib/cc-with-tweaks.sh (GDB): Add -data-directory
	data-directory as appropriate.
2012-09-14 08:03:34 +00:00
Siddhesh Poyarekar ddd7a8e76d * printcmd.c (ui_printf): Eliminate single-use variable
PARAM_LEN.
2012-09-14 07:00:42 +00:00
Yao Qi d649a38e15 gdb/
* valops.c (value_assign): Move observer_notify_target_changed
	below to replace reinit_frame_cache.
2012-09-14 00:54:58 +00:00
gdbadmin ddd22875dd *** empty log message *** 2012-09-14 00:00:03 +00:00
Yit Phang Khoo b9516fa158 Refactor Python "gdb" module into a proper Python package, by introducing
a new "_gdb" module for code implemented in C, and using reload/__import__
instead of exec.

gdb/

	* python/lib/gdb/__init__.py: Import * from _gdb.
	(GdbOutputFile, sys.stdout, GdbOutputErrorFile, sys.stderr,
	prompt_hook, sys.argv): Moved from finish_python_initialization.
	(pretty_printers, PYTHONDIR): Moved from _initialize_python.
	(packages, auto_load_packages): New list and function replacing
	module_dict and auto-loading code, using __file__ instead of
	gdb.PYTHONDIR and reload/__import__ instead of exec.
	(GdbSetPythonDirectory): Replacing function of the same name
	from finish_python_initialization, using reload/__import__ instead
	of exec, as well as call auto_load_packages.
	* python/py-prettyprint.c (find_pretty_printer_from_gdb): Check
	gdb_python_module and not gdb_module.
	* python/python-internal.h (gdb_python_module): Declare.
	* python/python.c (gdb_python_module): New global.
	(before_prompt_hook): Check gdb_python_module and not gdb_module.
	(_initialize_python): Rename gdb module to _gdb.
	Move gdb.PYTHONDIR and gdb.pretty_printer to lib/gdb/__init__.py.
	(finish_python_initialization): Move Python code to
	lib/gdb/__init__.py; instead, set up sys.path and import gdb into
	__main__.

gdb/testsuite/

	* gdb.python/python.exp (Test stderr location): Update module
	location of GDB-specific sys.stderr.
	(Test stdout location): Ditto for sys.stdout.
2012-09-13 21:49:32 +00:00
Jan Kratochvil 121c73f33a gdb/doc/
* gdbint.texinfo (Defining Other Architecture Features): Clarify *pcptr
	encoding for gdbarch_breakpoint_from_pc, bp_addr for
	gdbarch_push_dummy_call and bp_addr for gdbarch_push_dummy_code.
2012-09-13 17:35:35 +00:00
Pedro Alves aa0fbdd82c 2012-09-13 Pedro Alves <palves@redhat.com>
* Makefile.in (COMMON_OBS): Add registry.o.
	* registry.c: New file.
	* registry.h (struct registry_container): Declare.
	(registry_data_callback): New typedef.
	(struct registry_data, struct registry_data_registration, struct
	registry_data_registry): New type.
	(register_data_with_cleanup, registry_alloc_data)
	(registry_callback_adaptor, registry_clear_data)
	(registry_container_free_data, registry_set_data, registry_data):
	Declare.
	(DEFINE_REGISTRY): Refactor structures and functions as shims over
	the new common structures and functions.
	(DECLARE_REGISTRY): Declare struct TAG ## _data.  Use the tagged
	callback typedefs.
2012-09-13 14:35:16 +00:00
Jan Kratochvil 18dc9ad804 gdb/testsuite/
* gdb.base/valgrind-infcall.exp: Remove comment about Ubuntu.
2012-09-13 05:32:09 +00:00
gdbadmin c4cd29c1f4 *** empty log message *** 2012-09-13 00:00:33 +00:00
Keith Seitz ea3a9873f8 * gdb.cp/converts.cc (main): Comment out the pointer to boolean
conversion statement.
2012-09-12 23:29:05 +00:00
Mike Wrighton dd61ec5cb3 * gdb/remote.c (remote_insert_hw_breakpoint): Throw exception if
there is an error inserting hardware breakpoints and use the
error message from the target.

* gdb/breakpoint.c (insert_bp_location, insert_breakpoint_locations):
Catch this exception and print the error message contained within. Do not
print the default hardware error breakpoint message in this case.
2012-09-12 20:01:10 +00:00
Doug Evans a1b64ce14e * dwarf2read.c (dwarf2_read_addr_index): Fix handling the case where
cu == NULL.
2012-09-12 18:57:40 +00:00
Doug Evans 5941debbf2 * gdb.base/help.exp: Remove testing of individual command help text,
too much of a maintenance burden.  Instead, test the functionality
	of "help" itself.
2012-09-12 18:55:49 +00:00
gdbadmin a67fa328ad *** empty log message *** 2012-09-12 00:00:33 +00:00
Doug Evans 83a788b8b1 * dwarf2read.c (dw2_do_expand_symtabs_matching): Don't examine
.gdb_index symbol attributes if there are none.
2012-09-11 22:42:22 +00:00
Doug Evans 3a0ed5d779 * gdb.cp/mb-inline.exp: Do "info break" after setting multi-location
breakpoint.
2012-09-11 21:37:04 +00:00
Joel Brobecker d9eaeb59a4 Name of symbol missing when printing global variable's address
The build_address_symbolic funnction filters out data symbols if
their size is set to zero.  But the problem is that the COFF symbol
table (for instance) does not provide any size information, leaving
the size to its default value of zero, thus always triggering
the filter.

This shows up when trying to print the address of a global variable
when debugging a Windows executable, for instance.

gdb/ChangeLog:

        * symtab.h (struct minimal_symbol) [has_size]: New field.
        (MSYMBOL_SIZE): Adjust to forbid macro from being used as lvalue.
        (SET_MSYMBOL_SIZE, MSYMBOL_HAS_SIZE): New macros.
        * printcmd.c (build_address_symbolic): Only filter out zero-sized
        minimal symbols if the symbol's size is actually known.
        * minsyms.c (prim_record_minimal_symbol_full): Adjust setting
        of msymbol's size field.  Add comment.
        * elfread.c (elf_symtab_read, elf_rel_plt_read): Use
        SET_MSYMBOL_SIZE to set the minimal symbol size.
2012-09-11 21:26:16 +00:00
Joel Brobecker a83e9154c2 install_minimal_symbols: use memset instead of setting each field.
gdb/ChangeLog:

        * minsyms.c (install_minimal_symbols): Use memset to fill entire
        minimal_symbol struct object, rather than setting some of its
        fields one by one.
2012-09-11 21:26:04 +00:00
Doug Evans cfc35e0232 * gdb.dwarf2/fission-base.S: Include gdb.dwarf2/ in dwo_name.
* gdb.dwarf2/fission-reread.S: Ditto.
	* gdb.dwarf2/fission-base.exp: Remove setting of debug-file-directory.
	* gdb.dwarf2/fission-reread.exp: Ditto.
2012-09-11 16:42:09 +00:00
Andrew Burgess 350b1b266b http://sourceware.org/ml/gdb-patches/2012-09/msg00013.html
gdb/ChangeLog:
        * c-typeprint.c (c_type_print_varspec_prefix): Pass through the
        passed_a_ptr flag when displaying typedef types.


gdb/testsuite/ChangeLog:
        * gdb.base/ptype.exp: Test ptype on a pointer to a typedef.
2012-09-11 09:03:08 +00:00
gdbadmin fbc8ccad52 *** empty log message *** 2012-09-11 00:00:32 +00:00
Joel Brobecker 2fa15f237d crash printing optimized out variant type
Assuming the following declarations:

   type Discriminants_Record (A : Integer; B : Boolean) is record
      C : Float;
   end record;
   Z : Discriminants_Record := (A => 1, B => False, C => 2.0);

If variable Z is not used, and the compiler optimizes it out,
GDB would crash as follow:

    (gdb) print Z
    /[...]/gdb/valops.c:1121: internal-error: Unexpected lazy value type.

This is because the ada-lang module forgot to set the optimized_out
flag in the value returned by ada_evaluate_subexp during the value's
"fixing" process.  Later on, when trying to print the resulting value,
GDB finds that the value is still lazily allocated, and thus tries to
fetch it. But this is not allowed for not_lval values, hence the internal
error.

gdb/ChangeLog:

        * ada-lang.c (coerce_unspec_val_to_type): Make sure that
        the optimized_out flag is preserved.

gdb/testsuite/ChangeLog:

        * gdb.ada/optim_drec: New testcase.
2012-09-10 22:18:24 +00:00
Anthony Green 5152ff9039 Fix function prologue analyzer for moxie. 2012-09-10 21:16:43 +00:00
Doug Evans 09be558e10 * boards/fission.exp: Explicitly mark "board" as not remote. 2012-09-10 17:48:11 +00:00
Keith Seitz 5b4f6e25c3 PR gdb/13483
* gdbtypes.h (BOOL_PTR_CONVERSION_BADNESS): Rename to ...
	(BOOL_CONVERSION_BADNESS): ... this.
	* gdbtypes.c (BOOL_PTR_CONVERSION_BADNESS): Likewise.
	(rank_one_type): Allow all boolean conversions
	permitted by the standard.

	* gdb.cp/converts.cc (A::A): Add ctor.
	(A::member_): Add member.
	(enum my_enum): New enumeration.
	(main): Add calls to foo1_7 with various
	permitted arguments.
	* gdb.cp/converts.exp: Add tests for boolean
	conversions permitted by the standard.
2012-09-10 17:12:53 +00:00
gdbadmin 46bdd3117a *** empty log message *** 2012-09-10 00:00:03 +00:00
gdbadmin b7099d964f *** empty log message *** 2012-09-09 00:00:33 +00:00
Yit Phang Khoo b4ca5ed946 2012-09-08 Khoo Yit Phang <khooyp@cs.umd.edu>
Replace -nw option with $INTERNAL_GDBFLAGS in "xgdb" tests to
	avoid spurious results due to ~/.gdbinit.
	* gdb.gdb/complaint.exp (setup_test): Replace -nw option with
	$INTERNAL_GDBFLAGS in run command.
	* gdb.gdb/observer.exp (setup_test): Ditto.
	* gdb.gdb/selftest.exp (test_with_self): Ditto.
	* gdb.gdb/xfullpath.exp (setup_test): Ditto.
2012-09-08 05:29:21 +00:00
gdbadmin 6c184df7bb *** empty log message *** 2012-09-08 00:00:03 +00:00
gdbadmin 610b99881a *** empty log message *** 2012-09-07 00:00:33 +00:00
Doug Evans 1491095679 * boards/fission.exp: New file. 2012-09-06 20:39:48 +00:00
Tom Tromey f10704261b * python/py-newobjfileevent.c (create_new_objfile_event_object):
Don't decref py_objfile.
2012-09-06 20:14:13 +00:00
Doug Evans db90b9d320 (test_subscript_regression): Remove no longer necessary globals,
from previous patch.
2012-09-06 17:57:41 +00:00
Doug Evans d54b30bb5d * gdb.python/py-value.exp: Use clean_restart. 2012-09-06 17:52:38 +00:00
gdbadmin 7cb3ff4c19 *** empty log message *** 2012-09-06 00:00:03 +00:00
Doug Evans 91b253e153 * gdb.base/info-macros.c: Fix whitespace. 2012-09-05 18:20:53 +00:00
gdbadmin 8109897381 *** empty log message *** 2012-09-05 00:00:03 +00:00
Hans-Peter Nilsson 07c04788ea * linux-crisv32-low.c: Fix compile errors. 2012-09-04 23:54:41 +00:00
Yao Qi 918d227b01 gdb/gdbserver/
* tracepoint.c (cmd_qtsv): Adjust debug message.
	Don't check CUR_TPOINT.
2012-09-04 01:47:49 +00:00
gdbadmin 916abb21de *** empty log message *** 2012-09-04 00:00:02 +00:00
gdbadmin 98c4139e84 *** empty log message *** 2012-09-03 00:00:03 +00:00