Commit Graph

31135 Commits

Author SHA1 Message Date
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
Yit Phang Khoo a8db421230 2012-09-02 Khoo Yit Phang <khooyp@cs.umd.edu>
Do not enable -lmcheck by default when Python is enabled with
	threading support.
	* configure.ac: (python_has_threads) New variable, by testing
	if WITH_THREAD is defined in Python.h.
	Move --enable-lmcheck after --with-python.
	Do not enable -lmcheck by default if python_has_threads=yes.
	Warn if --enable-lmcheck and python_has_threads=yes.
	* configure: Regenerate.
2012-09-02 22:57:43 +00:00
gdbadmin 76d4b318d5 *** empty log message *** 2012-09-02 00:00:32 +00:00
Yit Phang Khoo fda395cfae 2012-08-30 Khoo Yit Phang <khooyp@cs.umd.edu>
* MAINTAINERS (Write After Approval): Add "Khoo Yit Phang".
2012-09-01 03:14:15 +00:00
gdbadmin f25b8a5e71 *** empty log message *** 2012-09-01 00:00:33 +00:00
Yao Qi 648beb2ba9 gdb/
* mi/mi-cmds.c (mi_cmds): New macros DEF_MI_CMD_CLI
	DEF_MI_CMD_MI DEF_MI_CMD_CLI_1 and DEF_MI_CMD_CLI_1.
	Update some commands.
	* mi/mi-cmds.h (struct mi_cmd) <suppress_notification>: New field.
	* mi/mi-main.c (mi_cmd_execute): Set '*parse->cmd->suppress_notification'
	to 1.
2012-08-31 08:41:57 +00:00
Yao Qi ef07a9f766 gdb/
* mi/mi-cmds.c (mi_cmds): Add 'static'.
2012-08-31 08:30:38 +00:00
gdbadmin b1d8c8669b *** empty log message *** 2012-08-31 00:00:02 +00:00
Yit Phang Khoo 842d03030f Add "Khoo Yit Phang" to gdb/MAINTAINERS. 2012-08-30 18:59:53 +00:00
gdbadmin 37580ec21c *** empty log message *** 2012-08-30 00:00:33 +00:00
Doug Evans 8efd8e789a * main.c (print_gdb_help): Remove reference to
--use-deprecated-index-sections.
2012-08-29 19:17:16 +00:00
gdbadmin 92fae9b9c3 *** empty log message *** 2012-08-29 00:00:34 +00:00
Yao Qi 18c1b81abe gdb/gdbserver/
* ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
	* server.h: Include 'libiberty.h' and 'ansidecl.h'.
	(ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
	Remove declarations of xmalloc, xreallloc, xstrdup and
	freeargv.
	* Makefile.in (libiberty_h): New.
	(server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
	(linux-bfin-low.o): Append dependency 'libiberty.h'.
2012-08-28 16:53:30 +00:00
Yao Qi 883b9c6c98 gdb/
* cli/cli-cmds.c (max_user_call_depth): Add 'unsigned'.
	(init_cmds): Call add_setshow_uinteger_cmd for command
	'max-user-call-depth'.
	* cli/cli-script.c (execute_user_command): Add 'unsigned' to the
	declaration of 'max_user_call_depth'.
	* frame.c (backtrace_limit): Add 'unsigned'.
	(_initialize_frame): Call add_setshow_uinteger_cmd for command
	'limit'.
	* remote.c (remoteaddresssize): Add 'unsigned'.
	(remote_address_masked): Change local var 'address_size' to
	'unsigned'.
	(_initialize_remote): Call add_setshow_uinteger_cmd for
	'remoteaddresssize'.
	* top.c (history_size): Add 'unsigned'.
	(show_commands): Change local variables to 'unsigned'.
	(set_history_size_command): Don't check history_size is negative.
	Adjust the condition to call unstifle_history and set history_size
	to UNIT_MAX.
2012-08-28 14:08:42 +00:00
Pedro Alves 1292279a4e 2012-08-28 Pedro Alves <palves@redhat.com>
PR gdb/14428

	gdb/
	* infcmd.c (default_print_one_register_info): New, factored out
	from default_print_registers_info.
	(default_print_registers_info): Use it.  Mark value unavailable if
	necessary.
	(registers_info): Print user registers with
	default_print_one_register_info.

	gdb/testsuite/
	* gdb.base/pc-fp.exp: Adjust expected output of 'info registers pc fp'.
2012-08-28 09:05:35 +00:00
gdbadmin 6b3dde2885 *** empty log message *** 2012-08-28 00:00:02 +00:00
H.J. Lu f629cd7572 Check if TUI_SRC_WIN is not NULL before referencing it
PR tui/14486
	* tui/tui-source.c (tui_source_is_displayed): Check if TUI_SRC_WIN
	is not NULL before referencing it.
2012-08-27 17:00:42 +00:00
Jan Kratochvil 1c8cdcb14f gdb/
* breakpoint.c (parse_breakpoint_sals) <(*address) == NULL>: New
	variable pc.  Call find_pc_line instead of find_pc_overlay, restore
	original PC for it.

gdb/testsuite/
	* gdb.base/break-caller-line.c: New file.
	* gdb.base/break-caller-line.exp: New file.
2012-08-27 16:55:39 +00:00
Jan Kratochvil e968779960 gdb/
* auto-load.c (auto_load_objfile_script): Rename to ...
	(auto_load_objfile_script_1): ... here, change variable realname to
	parameter realname, document it, add return value, add variable retval.
	(auto_load_objfile_script): New function.

gdb/doc/
	* gdb.texinfo (objfile-gdb.py file): New paragraph for .exe stripping.
2012-08-27 16:50:54 +00:00
Jan Kratochvil 7afa16426a gdb/
* cli/cli-decode.c (print_doc_line): Keep skipping '.' and ',' not
	followed by a whitespace.
2012-08-27 16:47:15 +00:00
Jan Kratochvil 28e66c70aa ChangeLog fix:
PR gdb/14494.
	* dwarf2read.c (dwarf2_locate_sections): Move variable aflag here.
	Move the SEC_HAS_CONTENTS check here - for any NAMES use.
	(dwarf2_locate_sections) <eh_frame>: Move the variable and check from
	here.
2012-08-27 16:43:26 +00:00
Jan Kratochvil dc7650b823 gdb/
* dwarf2read.c (dwarf2_locate_sections): Move variable aflag here.
	Move the SEC_HAS_CONTENTS check here - for any NAMES use.
	(dwarf2_locate_sections) <eh_frame>: Move the variable and check from
	here.
2012-08-27 16:37:45 +00:00
Jan Kratochvil 1e8e8b5114 gdb/testsuite/
* gdb.ada/rdv_wait.exp (set debug-file-directory): New command.
	* gdb.arch/i386-cfi-notcurrent.S: New file.
	* gdb.arch/i386-cfi-notcurrent.exp: New file.
2012-08-27 16:34:35 +00:00
Pedro Alves 1591a1e852 2012-08-27 Wei-cheng Wang <cole945@gmail.com>
* memattr.c (create_mem_region): Fix memory region overlapping
	checking.

2012-08-27  Wei-cheng Wang  <cole945@gmail.com>
	    Yao Qi <yao@codesourcery.com>
	    Pedro Alves <palves@redhat.com>

	* gdb.base/memattr.exp (delete_memory, region_pass, region_fail):
	New procedures.
	(top level): Add overlap checking tests.
2012-08-27 08:58:01 +00:00
gdbadmin 3baafeb861 *** empty log message *** 2012-08-27 00:00:03 +00:00
gdbadmin 7ac88bf469 *** empty log message *** 2012-08-26 00:00:33 +00:00
gdbadmin 13d275de52 *** empty log message *** 2012-08-25 00:00:33 +00:00
Tom Tromey 4442ada7ba * lib/gdb.exp (skip_unwinder_tests): Don't leave 'ok' set if
gdb_test_multiple fails for other reasons.
2012-08-24 15:26:23 +00:00
Yit Phang Khoo 3b5e4d350d Move misplaced entries from gdb/ChangeLog to gdb/doc/ChangeLog.
2012-08-23  Khoo Yit Phang <khooyp@cs.umd.edu>

	Document how to return from "python-interactive" to GDB.
	* gdb.texinfo (Python Commands): Update documentation.

2012-08-22  Khoo Yit Phang <khooyp@cs.umd.edu>

	Add a new "python-interactive" command that starts a standard
	Python interactive prompt with "pi" as alias, and add "py" as
	an alias to "python".
	* gdb.texinfo (Python Commands): Document the new commands.
2012-08-24 15:23:59 +00:00
Siddhesh Poyarekar ecfb0d68c5 * h8300-tdep.c (h8300_push_dummy_call): Replace unsafe alloca
with xmalloc/cleanup.
        * mt-tdep.c (mt_push_dummy_call): Likewise.
        * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
        * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
2012-08-24 03:57:22 +00:00
Yao Qi e7d50cc9e6 gdb/testsuite/
* lib/gdb.exp (skip_unwinder_tests): Remove pass.
2012-08-24 03:19:58 +00:00