* eval.c (evaluate_subexp_standard) <BINOP_SUBSCRIPT>: Call
evaluate_subexp, not evaluate_subexp_with_coercion.
gdb/testsuite
* gdb.dwarf2/pieces.exp (pieces_test_f2): New proc.
Call it.
* dwarf2loc.c (read_pieced_value): Work properly when 'v' has an
offset.
(write_pieced_value): Likewise.
gdb/testsuite
* gdb.dwarf2.pieces.exp: New file.
* gdb.dwarf2.pieces.S: New file.
* gdb.dwarf2.pieces.c: New file.
This new testsuite routine allows us to test commands that are not
expected to generate any output.
2010-05-20 Pedro Alves <pedro@codesourcery.com>
Joel Brobecker <brobecker@adacore.com>
* lib/gdb.exp (gdb_test_no_output): New function.
* lib/gdb.ada/arrayidx.exp: Use gdb_test_no_output instead of gdb_test
when testing commands that should produce no output.
Tested on x86_64-linux.
* ada-lang.c: White space.
* ada-typeprint.c: White space.
* ada-valprint.c: White space.
* addrmap.c: White space.
* auxv.c: White space.
* ax-gdb.c: White space.
* linux-fork.c (inferior_call_waitpid_cleanup): Add check
for oldfp.
(inferior_call_waitpid): Move make_cleanup out of check.
Check the return of waitpid.
(delete_checkpoint_command): Add pptid to save fi->parent_ptid.
* tui/tui.c: White space.
* tui/tui-data.c: White space.
* tui/tui-disasm.c: White space.
* tui/tui-file.c: White space.
* tui/tui-interp.c: White space.
* tui/tui-main.c: White space.
* tui/tui-out.c: White space.
* tui/tui-regs.c: White space.
* tui/tui-source.c: White space.
* tui/tui-stack.c: White space.
* tui/tui-win.c: White space.
* tui/tui-winsource.c: White space.
The gdb.ada/watch_arg testcase is testing a situation where we are
leaving the scope where a parameter being watched is defined. The
testcase is a little non-sensical that we're watching a parameter
declared as an "access integer", which in non-Ada terms means
a constant pointer. Doesn't make much sense to watch a constant...
So this patch changes the code a little to use an "in out Integer",
which makes the parameter a non-constant integer, rather than a
constant access Integer. I verified that I could still reproduce
the problem with the original debugger and the modified testcase.
This was motivated by a patch that Sergio is about to submit which
will forbid the user from watching a constant (discussed on IRC)
2010-05-17 Joel Brobecker <brobecker@adacore.com>
* gdb.ada/watch_arg/watch.adb: Rewrite testcase to avoid the
parameter that we want to watch being a constant.
Tested on both sparc-solaris (where the ancient debugger could still
run ;-), and on x86_64-linux.
* python/py-auto-load.c: White space.
* python/py-block.c: White space.
* python/py-breakpoint.c: White space.
* python/py-cmd.c: White space.
* python/py-function.c: White space.
* python/py-lazy-string.c: White space.
* python/py-objfile.c: White space.
* python/py-param.c: White space.
* python/py-prettyprint.c: White space.
* python/py-progspace.c: White space.
* python/py-symtab.c: White space.
* python/python.c: White space.
* python/py-type.c: White space.
* python/py-utils.c: White space.
* python/py-value.c: White space.
* mi/mi-cmd-break.c: White space.
* mi/mi-cmd-env.c: White space.
* mi/mi-cmds.c: White space.
* mi/mi-cmd-stack.c: White space.
* mi/mi-cmd-var.c: White space.
* mi/mi-console.c: White space.
* mi/mi-getopt.c: White space.
* mi/mi-interp.c: White space.
* mi/mi-main.c: White space.
* mi/mi-out.c: White space.
* mi/mi-parse.c: White space.
* cli/cli-cmds.c: White space.
* cli/cli-decode.c: White space.
* cli/cli-dump.c: White space.
* cli/cli-interp.c: White space.
* cli/cli-logging.c: White space.
* cli/cli-script.c: White space.
* cli/cli-setshow.c: White space.
* valarith.c: White space.
* valops.c: White space.
* valprint.c: White space.
* value.c: White space.
* varobj.c: White space.
* xcoffread.c: White space.
* xml-support.c: White space.
* xml-tdesc.c: White space.
gdb/ChangeLog:
* parse.c (parse_exp_in_context): When block is not NULL, use
its associated language to parse the expression instead of
the current_language.
gdb/testsuite/ChangeLog:
* gdb.ada/cond_lang: New testcase.
gdb/testsuite/ChangeLog:
* lib/gdb.exp (banned_variables): New variable/constant.
(gdb_init): Add write trace on variables listed in banned_variables.
(gdb_finish): Remove write traces on variables listed in
banned_variables.
2010-05-17 Joel Brobecker <brobecker@adacore.com>
* gdb.base/gdb11530.exp: Delete setting of prms_id and bug_id.
* gdb.cp/koenig.exp: Likewise.
Tested on x86_64-linux.
This patch enhances GDB to take advantage of a recent change in the GNAT
encoding regarding XA types. A detailed description of the logic has
been added at the start of ada_fixup_array_indexes_type to give the
context behind this enhancement.
2010-05-17 Joel Brobecker <brobecker@adacore.com>
* ada-lang.c (to_fixed_range_type): The the raw index type as
argument instead of the raw type name. Remove orig_type parameter.
Update calls throughout.
(ada_fixup_array_indexes_type): New function.
(ada_array_bound_from_type): Add call to ada_fixup_array_indexes_type.
* ada-lang.h (ada_fixup_array_indexes_type): Add declaration.
* ada-typeprint.c (print_range_type): Renames print_range_type_named.
Remove name parameter.
(print_array_type): Add call to ada_fixup_array_indexes_type.
Update calls to print_range_type.
(ada_print_type): Update calls to print_range_type.
This patches improves a couple of previous patches:
- one that introduces reset_schedlock, but failed to add a declarationl;
- one that was checked in to avoid a compilation failure due to that
missing declaration.
It also improves the declaration itself to better conform to our coding
practices. Same for the comments.
2010-05-17 Joel Brobecker <brobecker@adacore.com>
* target.h (reset_schedlock): Add declaration.
* infrun.c (reset_schedlock): Add missing void in function profile.
* target.c (target_mourn_inferior): Delete local declaration of
reset_schedlock. Style-fix in comment.
* target.c: White space.
* target-descriptions.c: White space.
* target-memory.c: White space.
* thread.c: White space.
* top.c: White space.
* tracepoint.c: White space.
* trad-frame.c: White space.
* tramp-frame.c: White space.
* ui-file.c: White space.
* ui-out.c: White space.
* user-regs.c: White space.
* utils.c: White space.
* scm-exp.c: White space.
* scm-lang.c: White space.
* scm-valprint.c: White space.
* sentinel-frame.c: White space.
* ser-base.c: White space.
* ser-go32.c: White space.
* serial.c: White space.
* ser-mingw.c: White space.
* ser-pipe.c: White space.
* ser-tcp.c: White space.
* ser-unix.c: White space.
* solib.c: White space.
* solib-darwin.c: White space.
* solib-frv.c: White space.
* solib-irix.c: White space.
* solib-osf.c: White space.
* solib-pa64.c: White space.
* solib-som.c: White space.
* solib-spu.c: White space.
* solib-svr4.c: White space.
* solib-target.c: White space.
* source.c: White space.
* stabsread.c: White space.
* stack.c: White space.
* std-regs.c: White space.
* symfile.c: White space.
* symmisc.c: White space.
* symtab.c: White space.
* record.c: White space.
* regcache.c: White space.
* reggroups.c: White space.
* remote-fileio.c: White space.
* remote-m32r-sdi.c: White space.
* remote-mips.c: White space.
* remote-sim.c: White space.
* parse.c: White space.
* p-lang.c: White space.
* posix-hdep.c: White space.
* printcmd.c: White space.
* progspace.c: White space.
* prologue-value.c: White space.
* psymtab.c: White space.
* p-typeprint.c: White space.
* p-valprint.c: White space.
* m2-lang.c: White space.
* m2-valprint.c: White space.
* macrocmd.c: White space.
* macroexp.c: White space.
* macroscope.c: White space.
* macrotab.c: White space.
* main.c: White space.
* maint.c: White space.
* mdebugread.c: White space.
* memattr.c: White space.
* minsyms.c: White space.
* monitor.c: White space.
* jv-lang.c: White space.
* jv-typeprint.c: White space.
* jv-valprint.c: White space.
* language.c: White space.
* libunwind-frame.c: White space.
* linespec.c: White space.
* linux-nat.c: White space.
* linux-record.c: White space.
* linux-thread-db.c: White space.
* infcall.c: White space.
* inf-child.c: White space.
* infcmd.c: White space.
* inferior.c: White space.
* inf-loop.c: White space.
* inflow.c: White space.
* inline-frame.c: White space.
* interps.c: White space.