Commit Graph

4489 Commits

Author SHA1 Message Date
Jan Kratochvil cc80f26716 gdb/
Fix regression by the "ambiguous linespec" series.
	* breakpoint.c (parse_breakpoint_sals): New variable cursal.  Use
	get_last_displayed_symtab and get_last_displayed_line and depending
	on CURSAL.

gdb/testsuite/
	Fix regression by the "ambiguous linespec" series.
	* gdb.base/break.exp (list marker1, break lineno, delete $bpnum): New
	tests.
2012-06-11 19:16:24 +00:00
Jan Kratochvil bb2af9ccc5 gdb/testsuite/
* lib/future.exp: Set $use_gdb_compile even if only find_go_linker is
	missing.
2012-06-11 17:44:07 +00:00
Tom Tromey e81a37f7ed * infrun.c (handle_inferior_event)
<BPSTAT_WHAT_SET_LONGJMP_RESUME>: Don't delete the step-resume
	breakpoint.
	<BPSTAT_WHAT_CLEAR_LONGJMP_RESUME>: Remove longjmp logic; use
	exception logic in all cases.  Update comments.
	(insert_longjmp_resume_breakpoint): Set the exception resume
	breakpoint.
testsuite
	* gdb.base/longjmp.c (hidden_longjmp): Move expected catch
	location...
	(main): ...here.
2012-06-11 15:15:06 +00:00
Yao Qi 8efd7788e8 gdb/testsuite/
* gdb.trace/strace.exp: Shorten some too-long lines.
2012-06-07 15:07:03 +00:00
Pedro Alves 359f5fe60e gdb/
2012-06-06  Pedro Alves  <palves@redhat.com>

	* infrun.c (struct execution_control_state): Remove
	`new_thread_event' field.
	(handle_inferior_event): Simplify new threads handling; don't
	resume the inferior if we find a new thread.

gdb/testsuite/
2012-06-06  Pedro Alves  <palves@redhat.com>

	* gdb.threads/clone-new-thread-event.c: New file.
	* gdb.threads/clone-new-thread-event.exp: New file.
2012-06-06 18:10:17 +00:00
Yao Qi 7b2fe205fd gdb/testsuite/
* gdb.base/dprintf.c (main): Add extra parameter when calling
	printf and fprintf.
	(bar): New function.  It is a dead function, but to ensure
	'malloc' is linked explicitly.
2012-06-06 08:51:22 +00:00
Yao Qi 3eca55e89d gdb/testsuite/
* gdb.base/info-proc.exp: Return if target doesn't support
	'info proc'.
2012-06-06 08:47:04 +00:00
Jan Kratochvil 91cc9324e0 gdb/testsuite/
* gdb.base/freebpcmd.exp (set lines): Check valid range of I.
	(run program with breakpoint commands): XFAIl if it is not.
2012-06-05 19:06:20 +00:00
Joel Brobecker c56e7c4390 Make ctxobj.exp and print-file-var.exp work on all platforms.
This patch adjusts the testing strategy used in a couple of testcases
where we are trying to print the value of a global variable defined
at multiple locations.  The problem is that the actual value depends
on the platform.  So instead of hard-coding the expected value in
the testcase script, we use local variables (in the inferior) holding
the correct value, and we compare the global variable's value with
the local variable's value.

gdb/testsuite/ChangeLog:

        * gdb.base/ctxobj-f.c (GET_VERSION): Introduce local variable
        and add comment.
        * gdb.base/ctxobj-m.c (main): Rewrite, and add comment.
        * gdb.base/ctxobj.exp: Insert breakpoint in ctxobj-f.c using
        "STOP" marker.  Adjust testing strategy to make it work on
        all targets.

        * gdb.base/print-file-var-main.c (main): Rewrite using local
        variables and adjust get_version_2's return value check.
        Add small comment.
        * gdb.base/print-file-var.exp: Insert breakpoint using "STOP"
        marker.  Adjust testing strategy to make it work on all targets.
2012-06-05 13:50:31 +00:00
Joel Brobecker ccab2054e9 stop parsing breakpoint command if invalid keyword found
With an Ada program, trying to break on a specific Ada task, but
with the wrong capitalization of the `task' keyword, we currently
get only pieces of the "garbage" that caused the error:

    (gdb) b *rendez_vous'address TASK 2
    Garbage 2 at end of command

Pushing this a little further:

    (gdb) b *rendez_vous'address TASK Task TaSK 2
    Garbage 2 at end of command

Another interesting failure mode:

    (gdb) b *rendez_vous'address TASK if
    Argument required (expression to compute).

The parser skipped `TASK', then found the `if' keyword, and thus
started looking for a condition.

This patch fixes the problem by aborting the parsing as soon as
an invalid keyword is found.  This makes it consistent with the
case where the REST parameter is passed as NULL (where an error
is raised immediately after seeing the first invalid keyword).

It also introduces a new testcase that reproduces all above scenarios.

gdb/ChangeLog:

        * breakpoint.c (find_condition_and_thread): Stop parsing
        as soon as the first invalid keyword is found.

gdb/testsuite/ChangeLog:

        * gdb.ada/bad-task-bp-keyword: New testcase.
2012-06-05 13:50:13 +00:00
Jan Kratochvil 952cf74c00 gdb/testsuite/
* gdb.base/code_elim.exp
	(add-symbol-file ${testfile1} 0x100000)
	(add-symbol-file ${testfile2} 0x200000): Wrap them to 'order1' and
	'order2'.
	(order1: add-symbol-file ${testfile1} 0x100000)
	(order1: add-symbol-file ${testfile2} 0x200000)
	(order2: add-symbol-file ${testfile2} 0x200000)
	(order2: add-symbol-file ${testfile1} 0x100000): Add -s .data and -s
	.bss as appropriate.
2012-06-03 17:10:28 +00:00
Jan Kratochvil d0d8615806 gdb/testsuite/
* gdb.base/code_elim.exp (add-symbol-file ${testfile1} 0x100000):
	Simplify it to ...
	(symbol-file ${testfile1}): ... here.
	(test eliminated var my_global_symbol)
	(test eliminated var my_static_symbol)
	(test eliminated var my_global_func, get address of main): Wrap them to
	'single psymtabs' and 'single symtabs'
	(get address of my_global_symbol, get address of my_static_symbol)
	(get address of my_global_func, get address of main): Wrap them to
	'order1' and 'order2'.
2012-06-03 17:06:04 +00:00
Jan Kratochvil 0c5bf5a97d gdb/
* solib-svr4.c (svr4_current_sos): New comment on
	svr4_current_sos_via_xfer_libraries fall back.

gdb/gdbserver/
	* linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.

gdb/testsuite/
	* gdb.server/solib-list-lib.c: New file.
	* gdb.server/solib-list-main.c: New file.
	* gdb.server/solib-list.exp: New file.
2012-05-28 20:37:29 +00:00
Maciej W. Rozycki 4196f32530 * gdb.trace/unavailable.exp (gdb_collect_globals_test): Update
for 'set print symbol' change.
2012-05-25 21:54:16 +00:00
Jan Kratochvil bfb05775e6 gdb/
* psymtab.c (lookup_symbol_aux_psymtabs): New variable stab_best.  Use
	it as a fallback for TYPE_IS_OPAQUE.
	* symfile.h (struct quick_symbol_functions): Mention TYPE_OPAQUE
	symbols for lookup_symbol.

gdb/testsuite/
	* gdb.dwarf2/dw2-icc-opaque.S: Add debug_info_seg3 and
	.debug_abbrev_seg3.
2012-05-24 22:14:36 +00:00
Jan Kratochvil 685b110556 gdb/
PR symtab/13277: Resolving opaque structures in ICC generated binaries.
	* dwarf2read.c (struct dwarf2_cu) <producer_is_icc>: New field.
	(producer_is_gxx_lt_4_6): Move the checking and caching to...
	(check_producer): ... this new function, which also checks for ICC
	and caches the result.
	(producer_is_icc): New function.
	(read_structure_type): Don't set TYPE_STUB_SUPPORTED if the
	producer was ICC.

gdb/testsuite/
	PR symtab/13277: Resolving opaque structures in ICC generated binaries.
	* gdb.dwarf2/dw2-icc-opaque.S: New file.
	* gdb.dwarf2/dw2-icc-opaque.exp: New file.
2012-05-24 22:09:21 +00:00
Pedro Alves a493e3e2e4 gdb/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

gdb/gdbserver/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

include/gdb/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        * gdb/signals.def: Replace TARGET_SIGNAL_ with GDB_SIGNAL_
	throughout.

sim/arm/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/avr/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/common/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/cr16/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/d10v/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/erc32/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/m32c/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/ppc/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/rl78/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/rx/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
2012-05-24 16:51:47 +00:00
Stan Shebs f3e0e9604d 2012-05-23 Stan Shebs <stan@codesourcery.com>
Kwok Cheung Yeung  <kcy@codesourcery.com>

	* Makefile.in (SUBDIR_MI_OBS): Add mi-cmd-info.o.
	(SUBDIR_MI_SRCS): Add mi-cmd-info.c.
	(mi-cmd-info.o): New rule.
	* osdata.h (info_osdata_command): New declaration.
	* osdata.c (info_osdata_command): Change to non-static.
	* mi/mi-cmds.h (mi_cmd_info_os): New declaration.
	* mi/mi-cmds.c (mi_cmds): Add -info-os MI command.
	* mi/mi-cmd-info.c: New file.

	* gdb.texinfo (Miscellaneous GDB/MI Commands): Document -info-os.

	* gdb.mi/mi-info-os.exp: New file.
2012-05-24 00:33:47 +00:00
Keith Seitz 11eb1b4dcc * gdb.trace/stap-trace.exp: If compile_stap_bin fails,
return -1 to suppress the rest of the tests.
	(compile_stap_bin): Return boolean success value.
2012-05-23 18:21:34 +00:00
Tom Tromey b1af9e9750 PR c++/7173:
* gnu-v3-abi.c (gnuv3_baseclass_offset): Return early for Java
	types.
	* value.h (value_cast_pointers): Update.
	* valops.c (value_cast_pointers): Add 'subclass_check' argument.
	(value_cast): Update.
	(update_search_result): New function.
	(do_search_struct_field): New, from search_struct_field.  Check
	for ambiguous results.
	(search_struct_field): Rewrite.
	* infcall.c (value_arg_coerce): Update.
	* eval.c (evaluate_subexp_standard) <STRUCTOP_MEMBER>: Use
	value_cast_pointers.
	* ada-lang.c (ada_convert_actual): Update.
testsuite
	* gdb.cp/inherit.exp (test_print_mi_members): Expect errors.
	Remove kfails.
	(test_print_mi_member_types): Likewise.
2012-05-21 19:47:54 +00:00
Tom Tromey 248537e34b * gdb.base/callfuncs.exp (do_function_calls): Update for 'set
print symbol' change.
2012-05-21 16:52:42 +00:00
Thiago Jung Bauermann d791e1550c * gdb.python/py-prompt.exp: Quit if the target is remote. 2012-05-19 01:05:38 +00:00
Jan Kratochvil e77afa2e83 gdb/testsuite/
Fix ERROR: internal buffer is full.
	* gdb.base/info-os.exp (expect_multiline): New function.
	(get process list, get process groups, get threads)
	(get file descriptors, get internet-domain sockets)
	(get shared-memory regions, get semaphores, get message queues): Use
	it for these tests.
2012-05-18 17:51:30 +00:00
Tom Tromey 9cb709b6ba PR exp/13907:
* valprint.h (struct value_print_options) <symbol_print>: New
	field.
	* valprint.c (user_print_options): Add default for symbol_print.
	(show_symbol_print): New function.
	(generic_val_print): Respect symbol_print.
	(_initialize_valprint): Add "print symbol" setting.
	* f-valprint.c (f_val_print): Respect symbol_print.
	* c-valprint.c (c_val_print): Respect symbol_print.
	* NEWS: Update.
	* printcmd.c (print_address_symbolic): Return int.  Ignore some
	zero-size symbols.
	(print_address_demangle): Return int.
	* defs.h: (print_address_symbolic): Return int.
	* value.h (print_address_demangle): Return int.
doc
	* gdb.texinfo (Print Settings): Document 'set print symbol'.
testsuite
	* gdb.mi/mi-var-cmd.exp: Update.
	* gdb.objc/basicclass.exp (do_objc_tests): Update.
	* gdb.cp/virtbase.exp: Update.
	* gdb.cp/classes.exp (test_static_members): Update.
	* gdb.cp/casts.exp: Update.
	* gdb.base/pointers.exp: Update.
	* gdb.base/funcargs.exp (pointer_args): Update.
	(structs_by_reference): Update.
	* gdb.base/find.exp: Update.
	* gdb.base/call-strs.exp: Send "set print symbol off".
	* gdb.base/call-ar-st.exp: Update.
	* gdb.ada/fun_addr.exp: Update.
	* gdb.base/printcmds.exp (test_print_symbol): New proc.
	Call it.
	(test_print_repeats_10, test_print_strings)
	(test_print_char_arrays): Update.
2012-05-18 15:31:42 +00:00
Tom Tromey b012acddd8 * valprint.c (val_print_string): Don't print leading space.
* p-valprint.c (pascal_val_print) <TYPE_CODE_PTR>: Optionally
	print space before string or vtbl.
	* m2-valprint.c (print_unpacked_pointer): Optionally print space
	before string.
	* jv-valprint.c (java_value_print): Print space before string.
	* go-valprint.c (print_go_string): Print space before string.
	* f-valprint.c (f_val_print) <TYPE_CODE_PTR>: Optionally print
	space before string.
	* c-valprint.c (c_val_print) <TYPE_CODE_PTR>: Optionally print
	space before string or vtbl.
	* auxv.c (fprint_target_auxv): Print space after address.
2012-05-18 15:29:13 +00:00
Tom Tromey 1d51a733d5 * printcmd.c (print_address_demangle): Remove special case for 0.
testsuite
	* gdb.mi/mi2-var-display.exp: Update.
	* gdb.mi/mi-var-display.exp: Update.
	* gdb.mi/mi-var-child.exp: Update.
	* gdb.cp/expand-psymtabs-cxx.exp: Update.
	* gdb.cp/cp-relocate.exp (get_func_address): Update.
2012-05-18 15:28:24 +00:00
Doug Evans 682c7f7b28 * info-macros.exp: Pass "debug" to prepare_for_testing. 2012-05-18 00:04:13 +00:00
Doug Evans 957df313b7 * Makefile.in (clean): Remove Fission .dwo and .dwp files.
* gdb.ada/Makefile.in (clean): Ditto.
	* gdb.arch/Makefile.in (clean): Ditto.
	* gdb.asm/Makefile.in (clean): Ditto.
	* gdb.base/Makefile.in (clean): Ditto.
	* gdb.cell/Makefile.in (clean): Ditto.
	* gdb.cp/Makefile.in (clean): Ditto.
	* gdb.disasm/Makefile.in (clean): Ditto.
	* gdb.dwarf2/Makefile.in (clean): Ditto.
	* gdb.fortran/Makefile.in (clean): Ditto.
	* gdb.go/Makefile.in (clean): Ditto.
	* gdb.hp/Makefile.in (clean): Ditto.
	* gdb.hp/gdb.aCC/Makefile.in (clean): Ditto.
	* gdb.hp/gdb.base-hp/Makefile.in (clean): Ditto.
	* gdb.hp/gdb.compat/Makefile.in (clean): Ditto.
	* gdb.hp/gdb.defects/Makefile.in (clean): Ditto.
	* gdb.hp/gdb.objdbg/Makefile.in (clean): Ditto.
	* gdb.java/Makefile.in (clean): Ditto.
	* gdb.linespec/Makefile.in (clean): Ditto.
	* gdb.mi/Makefile.in (clean): Ditto.
	* gdb.modula2/Makefile.in (clean): Ditto.
	* gdb.multi/Makefile.in (clean): Ditto.
	* gdb.objc/Makefile.in (clean): Ditto.
	* gdb.opencl/Makefile.in (clean): Ditto.
	* gdb.opt/Makefile.in (clean): Ditto.
	* gdb.pascal/Makefile.in (clean): Ditto.
	* gdb.python/Makefile.in (clean): Ditto.
	* gdb.reverse/Makefile.in (clean): Ditto.
	* gdb.server/Makefile.in (clean): Ditto.
	* gdb.stabs/Makefile.in (clean): Ditto.
	* gdb.threads/Makefile.in (clean): Ditto.
	* gdb.trace/Makefile.in (clean): Ditto.
	* gdb.xml/Makefile.in (clean): Ditto.
2012-05-17 19:03:59 +00:00
Tom Tromey abc9d0dc6e PR macros/13205:
* macrotab.h: (macro_define_special): Declare.
	(enum macro_special_kind): New.
	(struct macro_definition) <argc, replacement>: Update comments.
	* macrotab.c (new_macro_definition): Unconditionally set 'argc'.
	(macro_define_object_internal): New function.
	(macro_define_object): Use it.
	(macro_define_special): New function.
	(fixup_definition): New function.
	(macro_lookup_definition, foreach_macro_in_scope)
	(foreach_macro): Use fixup_definition.
	* macroexp.h (macro_stringify): Declare.
	* macroexp.c (free_buffer_return_text): New function.
	(stringify): Constify "arg".
	(macro_stringify): New function.
	* dwarf2read.c (macro_start_file): Call macro_define_special.
testsuite
	* gdb.base/macscp1.c (macscp_expr): Add comment.
	* gdb.base/macscp.exp: Test __FILE__ and __LINE__.
2012-05-16 20:31:10 +00:00
Joel Brobecker 4647ab1b6c Fix one of my ChangeLog entries.
I copy/pasted the wrong text... This fixes it.
2012-05-16 17:57:58 +00:00
Maciej W. Rozycki 6a3a010ba6 gdb/
* breakpoint.h (bp_location): Add related_address member.
	* inferior.h (get_return_value): Take a pointer to struct value
	instead of struct type for the function requested.
	* value.h (using_struct_return): Likewise.
	* gdbarch.sh (return_value): Take a pointer to struct value
	instead of struct type for the function requested.
	* breakpoint.c (set_breakpoint_location_function): Initialize
	related_address for bp_gnu_ifunc_resolver breakpoints.
	* elfread.c (elf_gnu_ifunc_resolver_return_stop): Pass the
	requested function's address to gdbarch_return_value.
	* eval.c (evaluate_subexp_standard): Pass the requested
	function's address to using_struct_return.
	* infcall.c (call_function_by_hand): Pass the requested
	function's address to using_struct_return and
	gdbarch_return_value.
	* infcmd.c (get_return_value): Take a pointer to struct value
	instead of struct type for the function requested.
	(print_return_value): Update accordingly.
	(finish_command_continuation): Likewise.
	* stack.c (return_command): Pass the requested function's
	address to using_struct_return and gdbarch_return_value.
	* value.c (using_struct_return): Take a pointer to struct value
	instead of struct type for the function requested.  Pass the
	requested function's address to gdbarch_return_value.
	* python/py-finishbreakpoint.c (finish_breakpoint_object):
	New function_value member, replacing function_type.
	(bpfinishpy_dealloc): Update accordingly.
	(bpfinishpy_pre_stop_hook): Likewise.
	(bpfinishpy_init): Likewise.  Record the requested function's
	address.
	* mips-tdep.c (mips_fval_reg): New enum.
	(mips_o32_push_dummy_call): For MIPS16 FP doubles do not swap
	words put in GP registers.
	(mips_o64_push_dummy_call): Update a comment.
	(mips_o32_return_value): Take a pointer to struct value instead
	of struct type for the function requested and use it to check if
	using the MIPS16 calling convention.  Return the designated
	general purpose registers for floating-point values returned in
	MIPS16 mode.
	(mips_o64_return_value): Likewise.
	* ppc-tdep.h (ppc_sysv_abi_return_value): Update prototype.
	(ppc_sysv_abi_broken_return_value): Likewise.
	(ppc64_sysv_abi_return_value): Likewise.
	* alpha-tdep.c (alpha_return_value): Take a pointer to struct
	value instead of struct type for the function requested.
	* amd64-tdep.c (amd64_return_value): Likewise.
	* amd64-windows-tdep.c (amd64_windows_return_value): Likewise.
	* arm-tdep.c (arm_return_value): Likewise.
	* avr-tdep.c (avr_return_value): Likewise.
	* bfin-tdep.c (bfin_return_value): Likewise.
	* cris-tdep.c (cris_return_value): Likewise.
	* frv-tdep.c (frv_return_value): Likewise.
	* h8300-tdep.c (h8300_return_value): Likewise.
	(h8300h_return_value): Likewise.
	* hppa-tdep.c (hppa32_return_value): Likewise.
	(hppa64_return_value): Likewise.
	* i386-tdep.c (i386_return_value): Likewise.
	* ia64-tdep.c (ia64_return_value): Likewise.
	* iq2000-tdep.c (iq2000_return_value): Likewise.
	* lm32-tdep.c (lm32_return_value): Likewise.
	* m32c-tdep.c (m32c_return_value): Likewise.
	* m32r-tdep.c (m32r_return_value): Likewise.
	* m68hc11-tdep.c (m68hc11_return_value): Likewise.
	* m68k-tdep.c (m68k_return_value): Likewise.
	(m68k_svr4_return_value): Likewise.
	* m88k-tdep.c (m88k_return_value): Likewise.
	* mep-tdep.c (mep_return_value): Likewise.
	* microblaze-tdep.c (microblaze_return_value): Likewise.
	* mn10300-tdep.c (mn10300_return_value): Likewise.
	* moxie-tdep.c (moxie_return_value): Likewise.
	* mt-tdep.c (mt_return_value): Likewise.
	* ppc-linux-tdep.c (ppc_linux_return_value): Likewise.
	* ppc-sysv-tdep.c (ppc_sysv_abi_return_value): Likewise.
	(ppc_sysv_abi_broken_return_value): Likewise.
	(ppc64_sysv_abi_return_value): Likewise.
	* ppcnbsd-tdep.c (ppcnbsd_return_value): Likewise.
	* rl78-tdep.c (rl78_return_value): Likewise.
	* rs6000-aix-tdep.c (rs6000_return_value): Likewise.
	* rx-tdep.c (rx_return_value): Likewise.
	* s390-tdep.c (s390_return_value): Likewise.
	* score-tdep.c (score_return_value): Likewise.
	* sh-tdep.c (sh_return_value_nofpu): Likewise.
	(sh_return_value_fpu): Likewise.
	* sh64-tdep.c (sh64_return_value): Likewise.
	* sparc-tdep.c (sparc32_return_value): Likewise.
	* sparc64-tdep.c (sparc64_return_value): Likewise.
	* spu-tdep.c (spu_return_value): Likewise.
	* tic6x-tdep.c (tic6x_return_value): Likewise.
	* v850-tdep.c (v850_return_value): Likewise.
	* vax-tdep.c (vax_return_value): Likewise.
	* xstormy16-tdep.c (xstormy16_return_value): Likewise.
	* xtensa-tdep.c (xtensa_return_value): Likewise.
	* gdbarch.c: Regenerate.
	* gdbarch.h: Regenerate.

	gdb/testsuite/
	* gdb.base/return-nodebug.exp: Also test float and double types.
2012-05-16 14:35:09 +00:00
Jan Kratochvil 54115cd45b gdb/testsuite/
* gdb.base/dprintf.exp: Remove now redundant breakpoint for main.
2012-05-15 13:36:18 +00:00
Jan Kratochvil 01429c8e86 gdb/testsuite/
PR testsuite/12649
	* gdb.base/dprintf.exp: Replace gdb_run_cmd by runto main.
2012-05-15 13:08:58 +00:00
Sergio Durigan Junior 0c5f383f80 gdb/testsuite/ChangeLog:
2012-05-14  Sergio Durigan Junior  <sergiodj@redhat.com>

	* gdb.base/stap-probe.exp (stap_test): Remove calls to
	`rerun_to_main'.
	(stap_test_no_debuginfo): Likewise.
2012-05-14 20:33:16 +00:00
Stan Shebs e7e0cddfb0 2012-05-14 Stan Shebs <stan@codesourcery.com>
Add dynamic printf.
	* breakpoint.h (enum bptype): New type bp_dprintf.
	(struct breakpoint): New field extra_string.
	(struct breakpoint_ops): Add arg to create_breakpoints_sal.
	(create_breakpoint): Add extra_string arg.
	* breakpoint.c (dprintf_breakpoint_ops): New.
	(is_breakpoint): Add bp_dprintf.
	(bpstat_what): Add dprintf case.
	(bptype_string): Ditto.
	(print_one_breakpoint_location): Ditto.
	(init_bp_location): Ditto.
	(bkpt_print_mention): Ditto.
	(dprintf_style_enums): New array.
	(dprintf_style): New global.
	(dprintf_function): New global.
	(dprintf_channel): New global.
	(update_dprintf_command_list): New function.
	(update_dprintf_commands): New function.
	(init_breakpoint_sal): Add extra_string argument, handle it.
	(create_breakpoint_sal): Add extra_string argument.
	(create_breakpoints_sal): Add extra_string argument, update callers.
	(find_condition_and_thread): Add extra argument.
	(create_breakpoint): Add extra_string argument, record it.
	(dprintf_command): New function.
	(break_command_1): Add arg to create_breakpoint call.
	(handle_gnu_v3_exceptions): Ditto.
	(trace_command): Ditto.
	(ftrace_command): Ditto.
	(strace_command): Ditto.
	(bkpt_print_mention): Add dprintf case.
	(create_breakpoint_sal_default): Add extra_string argument.
	(_initialize_breakpoint): Add new commands.
	* mi/mi-cmd-break.c (mi_cmd_break_insert): Add arg to call.
	* python/py-breakpoint.c (bppy_init): Ditto.
	* python/py-finishbreakpoint.c (bpfinishpy_init): Ditto.

	* gdb.texinfo (Dynamic Printf): New subsection.

	* gdb.base/dprintf.c: New file.
	* gdb.base/dprintf.exp: New file.
2012-05-14 15:38:41 +00:00
Hui Zhu c772f8e733 2012-05-11 Hui Zhu <hui_zhu@mentor.com>
* gdb.trace/Makefile.in (PROGS): Add disconnected-tracing.
	* gdb.trace/disconnected-tracing.c: New file.
	* gdb.trace/disconnected-tracing.exp: New file.
2012-05-14 02:20:54 +00:00
Siva Chandra Reddy 7efc75aaf9 2012-05-13 Siva Chandra Reddy <sivachandra@google.com>
Add a new function gdb.find_pc_line to the Python API.
	* NEWS (Python Scripting): Add entry about the new function.
	* python/python.c (gdbpy_find_pc_line): New function which
	implements gdb.find_pc_line.
	(GdbMethods): Add entry for the new function.

	doc/
	* gdb.texinfo (Basic Python): Add description about the function
	gdb.find_pc_line

	testsuite/
	* gdb.python/python.c: Add a new breakpoint comment.
	* gdb.python/python.exp: Add tests to test gdb.find_pc_line.
2012-05-13 11:33:44 +00:00
Stan Shebs 85d4a67695 2012-05-11 Stan Shebs <stan@codesourcery.com>
Kwok Cheung Yeung  <kcy@codesourcery.com>

	* NEWS: Describe new info os commands.
	* common/linux-osdata.c (PID_T, TIME_T): Define.
	(MAX_PID_T_STRLEN): New.
	(linux_common_core_of_thread): Add comment.  Change to use PID_T and
	MAX_PID_T_STRLEN.
	(command_from_pid): Add comment.  Change to use PID_T.
	(commandline_from_pid):  Change to use PID_T.
	(user_from_pid): Add comment.
	(get_process_owner): Add comment. Change to use PID_T and
	MAX_PID_T_STRLEN.
	(get_number_of_cpu_cores): Add comment.
	(get_cores_used_by_process): Add comment.  Change to use PID_T and
	MAX_PID_T_STRLEN.
	(linux_xfer_osdata_processes): Change to use PID_T and
	MAX_PID_T_STRLEN.
	(compare_processes): New function.
	(linux_xfer_osdata_processgroups): New function.
	(linux_xfer_osdata_threads): Change to use PID_T.
	(linux_xfer_osdata_fds): New function.
	(format_socket_state, print_sockets): New functions.
	(union socket_addr): New union.
	(linux_xfer_osdata_isockets): New function.
	(time_from_time_t, group_from_gid): New functions.
	(linux_xfer_osdata_shm): New function.
	(linux_xfer_osdata_sem): New function.
	(linux_xfer_osdata_msg): New function.
	(linux_xfer_osdata_modules): New function.
	(osdata_table): Add new entries.
	* common/buffer.c (buffer_xml_printf): Add support for long and
	long long format specifiers.

	* gdb.texinfo (Operating System Auxiliary Information): Document new
	'info os' subcommands.

	* gdb.base/info-os.exp: New file.
	* gdb.base/info-os.c: New file.
2012-05-11 22:24:24 +00:00
Joel Brobecker 64ea88dcd7 Add print 'file'::var testcase with two libs defining the same global variable
gdb/testsuite/ChangeLog:

	* gdb.base/print-file-var-lib1.c, gdb.base/print-file-var-lib2.c,
	gdb.base/print-file-var-main.c, gdb.base/print-file-var.exp:
	New files.

gdb/ChangeLog:

        * config/djgpp/fnchange.lst: Add entries for print-file-var-lib1.c,
        print-file-var-lib2.c, print-file-var-main.c and
        print-file-var.exp (located in gdb/testsuite/gdb.base).
2012-05-10 16:25:19 +00:00
Joel Brobecker afba63f109 New testcase: gdb.base/ctxobj.exp
gdb/testsuite/ChangeLog:

        * gdb.base/ctxobj-f.c, gdb.base/ctxobj-m.c, gdb.base/ctxobj-v.c,
        gdb.base/ctxobj.exp: New files.
2012-05-10 16:24:58 +00:00
Tom Tromey 9d198b1e46 * gdb.trace/strace.exp: Add 'quiet' to compiler flags. 2012-05-09 20:24:08 +00:00
Maciej W. Rozycki 9bfee71961 * lib/gdb.exp (gdb_test_multiple): Correct formatting. 2012-05-09 14:29:49 +00:00
Maciej W. Rozycki 3a7341d8b6 * gdb.mi/mi-var-display.exp: Check for the existence of $fp
before using it.
2012-05-08 07:22:19 +00:00
Tristan Gingold 52b3699b0b 2012-05-04 Tristan Gingold <gingold@adacore.com>
* printcmd.c (set_command): Emit a warning if the expression is not
	an assignment.

testsuite/
2012-05-04  Tristan Gingold  <gingold@adacore.com>

	* gdb.base/set-noassign.exp: New test.
2012-05-04 07:58:00 +00:00
Siva Chandra Reddy a20ee7a4a9 2012-05-03 Siva Chandra Reddy <sivachandra@google.com>
Add two new methods global_block and static_block to gdb.Symtab
	objects.
	* NEWS (Python scripting): Add entry about the new methods.
	* python/py-symtab.c (stpy_global_block): New function which
	implements the gdb.Symtab.global_block() method.
	(stpy_static_block): New function which implements the
	gdb.Symtab.static_block() method.
	(symtab_object_methods): Add entries for the two new methods.

	* testsuite/gdb.python/py-symbol.exp: Add tests to test the new
	methods gdb.Symtab.global_block() and gdb.Symtab.static_block().
	* tessuite/gdb.python/py-symbol.c: Add new struct to help test
	gdb.Symtab.static_block().

	* doc/gdb.texinfo (Symbol Tables In Python): Add documentation
	about the new methods global_block and static_block on
	gdb.Symtab objects.
2012-05-03 07:07:26 +00:00
Doug Evans bf2f0858b1 * gdb.dwarf2/pr13961.S: Add file and source location, but leave
commented out.
2012-05-03 06:49:05 +00:00
Yao Qi 2d4e03767f gdb/testsuite:
* gdb.base/catch-syscall.exp: Skip it before compilation if target
	doesn't support.
	* gdb.base/foll-exec.exp, gdb.base/foll-fork.exp: Likewise.
	* gdb.base/foll-vfork.exp, gdb.multi/bkpt-multi-exec.exp: Likewise.
2012-05-03 02:05:15 +00:00
Yao Qi 6d0bb9f3db gdb/testsuite:
* gdb.mi/mi-solib.exp: Setup kfail for gdb/13860.
2012-05-03 01:52:31 +00:00
Doug Evans fd8205284b * dwarf2read.c (init_cutu_and_read_dies): Renamed from
init_and_read_dies_worker.  All callers updated.
	(init_cu_and_read_dies, init_tu_and_read_dies): Delete.  All calls
	replaced with init_cutu_and_read_dies.
	(load_partial_comp_unit): Pass 1 for use_existing_cu.
	(find_partial_die): Remove FIXME.  Don't free current CU.

	testsuite/
	* gdb.dwarf2/pr13961.S: New file.
	* gdb.dwarf2/pr13961.exp: New file.
2012-05-01 03:00:36 +00:00
Yao Qi b9e219b912 gdb/testsuite:
* gdb.dwarf2/dw2-ifort-parameter.exp: Use proc `dwarf2_support'.
2012-04-29 06:40:02 +00:00