Pedro Alves
c709acd150
2011-09-02 Pedro Alves <pedro@codesourcery.com>
...
gdb/
* value.c (show_convenience): Catch errors thrown while printing
each internal variable.
* infrun.c (validate_siginfo_access): New function.
(siginfo_value_read, siginfo_value_write): Call it.
2011-09-02 12:18:27 +00:00
Jan Kratochvil
c8f2448ab7
gdb/
...
Code cleanup - constify struct lval_funcs.
* dwarf2loc.c (pieced_value_funcs): Make it const.
* infrun.c (siginfo_value_funcs): Likewise.
* opencl-lang.c (opencl_value_funcs): Likewise.
* valops.c (value_assign, value_ind): Make the funcs variable const.
* value.c (struct value): Make location.computed.funcs target const.
Rearrange the comments.
(allocate_computed_value): Make the funcs parameter target const.
(value_computed_funcs): Return the funcs target const.
(value_free, value_copy, set_value_component_location): Make the funcs
variable const.
* value.h (allocate_computed_value): Make the funcs parameter target
const.
(value_computed_funcs): Return the funcs target const.
* windows-tdep.c (tlb_value_funcs): Make it const.
2011-07-14 15:00:20 +00:00
Jan Kratochvil
a7035dbbd1
gdb/
...
Code cleanup making also optimized out values lazy.
* dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
allocate_optimized_out_value. Twice.
(loclist_read_variable) Use allocate_optimized_out_value. Once.
* findvar.c (read_var_value): Likewise.
* value.c (allocate_optimized_out_value): New function.
* value.h (allocate_optimized_out_value): New declaration.
2011-07-12 21:16:48 +00:00
Tom Tromey
ff355380ea
* dwarf2read.c (dwarf2_add_field): Constify.
...
* value.c (value_static_field): Constify.
* gdbtypes.h (struct main_type) <field.field_location.physname>:
Now const.
* ax-gdb.c (gen_static_field): Constify
2011-05-18 20:19:52 +00:00
Tom Tromey
1d06ead687
* value.c (value_fn_field): Constify.
...
* symtab.c (gdb_mangle_name): Constify.
* stabsread.c (update_method_name_from_physname): Make 'physname'
argument const.
* p-typeprint.c (pascal_type_print_method_args): Make arguments
const. Use explicit fputc_filtered loop.
(pascal_type_print_base): Constify.
* p-lang.h (pascal_type_print_method_args): Update.
* linespec.c (add_matching_methods): Constify.
(add_constructors): Likewise.
* jv-typeprint.c (java_type_print_base): Constify.
* gdbtypes.h (struct cplus_struct_type)
<fn_fieldlist.fn_field.physname>: Now const.
* dwarf2read.c (compute_delayed_physnames): Constify.
(dwarf2_add_member_fn): Likewise.
* c-typeprint.c (c_type_print_base): Constify. Use cleanups.
2011-05-18 16:30:37 +00:00
Tom Tromey
8a9b8146fd
gdb
...
PR gdb/12617:
* value.h (value_from_contents): Declare.
* value.c (value_from_contents): New function.
* dwarf2read.c (dwarf_stack_op_name): Add new values.
(dwarf2_get_die_type): New function.
* dwarf2loc.c (dwarf_expr_get_base_type): New function.
(allocate_piece_closure): Acquire reference to values.
(read_pieced_value): Update for value-based expressions.
(write_pieced_value): Likewise.
(free_pieced_value_closure): Call value_free as needed.
(dwarf2_evaluate_loc_desc_full): Set get_base_type field.
Update for value-based expressions.
* dwarf2loc.h (dwarf2_get_die_type): Declare.
* dwarf2expr.h (struct dwarf_stack_value) <value>: Change type.
<get_base_type>: New field.
(struct dwarf_expr_piece) <v.value>: Change type.
<v.regno>: New field.
(struct dwarf_expr_context) <mark>: New field.
(dwarf_expr_piece, dwarf_expr_fetch): Update.
(dwarf_expr_pop, dwarf_expr_push): Remove.
(dwarf_expr_push_address): Declare.
* dwarf2expr.c (dwarf_arch_cookie): New global.
(struct dwarf_gdbarch_types): New.
(dwarf_gdbarch_types_init, dwarf_expr_address_type): New
functions.
(dwarf_expr_push): Change type of 'value' argument. Update. Now
static.
(dwarf_expr_push_address): New function.
(dwarf_expr_pop): Now static.
(dwarf_expr_fetch): Change return type.
(dwarf_require_integral): New function.
(dwarf_expr_fetch): Simplify.
(add_piece): Update.
(base_types_equal_p, dwarf_get_base_type, get_unsigned_type): New
functions.
(execute_stack_op) <sign_ext>: Remove.
Use values for DWARF stack.
<DW_OP_GNU_const_type, DW_OP_GNU_deref_type,
DW_OP_GNU_regval_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret>:
New cases.
(_initialize_dwarf2expr): New function.
(add_piece): Update.
(new_dwarf_expr_context): Set new field.
(free_dwarf_expr_context): Call value_free_to_mark.
* dwarf2-frame.c (no_base_type): New function.
(execute_stack_op): Set get_base_type field. Update.
gdb/testsuite
* gdb.dwarf2/typeddwarf.S: New file.
* gdb.dwarf2/typeddwarf.c: New file.
* gdb.dwarf2/typeddwarf.exp: New file.
2011-05-12 17:40:55 +00:00
Michael Snyder
3bd0f5efd1
2011-02-24 Michael Snyder <msnyder@vmware.com>
...
* value.c (value_from_history_ref): New function.
* value.h (value_from_history_ref): Export.
* cli/cli-utils.c (get_number_trailer): Use value_from_history_ref
to parse value history references.
* cli/cli-utils.h (get_number_trailer): Update comment.
2011-02-24 Michael Snyder <msnyder@vmware.com>
* gdb.base/break.exp: Add tests for delete breakpoints using
convenience variables and value history references.
2011-02-27 20:57:16 +00:00
Pedro Alves
29976f3f7e
gdb/
...
* value.c (value_contents_copy_raw): Extend describing comment.
Assert that the destination contents we're overwriting are wholly
available.
* value.h (value_contents_copy): Extend describing comment.
2011-02-16 11:55:59 +00:00
Pedro Alves
cd24cfaa4f
* value.c (value_available_contents_eq): Remove redundant local
...
variables. Fix available contents comparision.
* value.h (value_available_contents_eq): Extend describing
comment.
2011-02-16 10:13:53 +00:00
Michael Snyder
db5f229b95
2011-02-14 Michael Snyder <msnyder@vmware.com>
...
* command.h (enum command_class): New class 'no_set_class', for
"show" commands without a corresponding "set" command.
* value.c (_initialize_values): Use 'no_set_class' for "show values".
* copying.c (_initialize_copying): Ditto for "show copying" and
"show warranty".
* cli/cli-cmds.c (init_cli_cmds): Ditto for "show commands" and
"show version".
* cli/cli-setshow.c (cmd_show_list): Skip "show" commands for
which there is no corresponding "set" command (eg. "show copying").
2011-02-14 23:41:33 +00:00
Pedro Alves
6bfc80c738
* value.c (mark_value_bytes_unavailable): Fix indexing the `bef'
...
range.
2011-02-14 12:54:42 +00:00
Pedro Alves
e730304246
* value.c (value_bits_valid, value_bits_synthetic_pointer):
...
No longer handle NULL values.
2011-02-14 11:52:48 +00:00
Pedro Alves
8af8e3bc81
gdb/
...
* exceptions.h (NOT_AVAILABLE_ERROR): New error.
* value.c: Include "exceptions.h".
(require_available): Throw NOT_AVAILABLE_ERROR instead of a
generic error.
* cp-abi.c: Include gdb_assert.h.
(baseclass_offset): Add `embedded_offset' and `val' parameters.
Assert the method is implemented. Wrap NOT_AVAILABLE_ERROR
errors.
* cp-abi.h (baseclass_offset): Add `embedded_offset' and `val'
parameters. No longer returns -1 on error.
(struct cp_abi_ops) <baseclass_offset>: Add `embedded_offset' and
`val' parameters.
* cp-valprint.c: Include exceptions.h.
(cp_print_value): Handle NOT_AVAILABLE_ERROR errors when fetching
the baseclass_offset. Handle unavailable base classes. Use
val_print_invalid_address.
* p-valprint.c: Include exceptions.h.
(pascal_object_print_value): Handle NOT_AVAILABLE_ERROR errors
when fetching the baseclass_offset. No longer expect
baseclass_offset returning -1. Handle unavailable base classes.
Use val_print_invalid_address.
* valops.c (dynamic_cast_check_1): Rename `contents' parameter to
`valaddr' parameter, and change its type to gdb_byte pointer. Add
`embedded_offset' and `val' parameters. Adjust.
(dynamic_cast_check_2): Rename `contents' parameter to `valaddr'
parameter, and change its type to gdb_byte pointer. Add
`embedded_offset' and `val' parameters. Adjust. No longer expect
baseclass_offset returning -1.
(value_dynamic_cast): Use value_contents_for_printing rather than
value_contents. Adjust.
(search_struct_field): No longer expect baseclass_offset returning
-1.
(search_struct_method): If reading memory from the target is
necessary, wrap it in a new value to pass to baseclass_offset. No
longer expect baseclass_offset returning -1.
(find_method_list): No longer expect baseclass_offset returning
-1. Use value_contents_for_printing rather than value_contents.
* valprint.c (val_print_invalid_address): New function.
* valprint.h (val_print_invalid_address): Declare.
* gdbtypes.c (is_unique_ancestor_worker): New `embedded_offset'
and `val' parameters. No longer expect baseclass_offset returning
-1. Adjust.
* gnu-v2-abi.c: Include "exceptions.h".
(gnuv2_baseclass_offset): Add `embedded_offset' and `val'
parameters. Handle unavailable memory. Recurse through
gnuv2_baseclass_offset directly, rather than through
baseclass_offset. No longer returns -1 on not found, instead
throw an error.
* gnu-v3-abi.c (gnuv3_baseclass_offset): Add `embedded_offset' and
`val' parameters. Adjust.
gdb/testsuite/
* gdb.trace/unavailable.cc (class Base, class Middle, class
Derived): New types.
(derived_unavail, derived_partial, derived_whole): New globals.
(virtual_partial): New global.
(virtualp): Point at virtual_partial.
* gdb.trace/unavailable.exp (gdb_collect_globals_test): Add tests
related to unavailable vptr.
2011-02-14 11:35:45 +00:00
Pedro Alves
ec0a52e162
gdb/testsuite/
...
* gdb.trace/unavailable.cc (struct Virtual): New.
(virtualp): New global pointer.
* gdb.trace/unavailable.exp (gdb_collect_globals_test): Test
printing a pointer to an object whose type has a vtable, with
print object on.
gdb/
* value.h (value_entirely_available): Declare.
* value.c (value_entirely_available): New function.
* c-valprint.c (c_value_print): Don't try fetching the pointer's
real type if the pointer is unavailable.
2011-02-14 11:33:24 +00:00
Pedro Alves
39d3738556
gdb/
...
* value.h (value_contents_copy, value_contents_copy_raw): Declare.
* value.c (value_contents_copy_raw, value_contents_copy): New
functions.
(value_primitive_field): Use value_contents_copy_raw instead of
memcpy.
* valops.c (value_fetch_lazy): Use value_contents_copy instead of
memcpy.
(value_array, value_slice): Ditto.
* valarith.c (value_subscripted_rvalue): Use
value_contents_copy_raw instead of memcpy.
gdb/testsuite/
* gdb.trace/unavailable.exp (gdb_collect_globals_test): Add new
tests for building arrays from unavailable values, subscripting
non-memory rvalue unvailable arrays, and accessing fields or
baseclasses of non-lazy unavailable values,
* gdb.trace/unavailable.cc (small_struct, small_struct_b): New
struct types.
(g_smallstruct, g_smallstruct_b): New globals.
2011-02-14 11:30:37 +00:00
Pedro Alves
5467c6c807
gdb/
...
* value.h (unpack_bits_as_long): Delete declaration.
(unpack_value_bits_as_long): Declare.
(unpack_value_field_as_long): Declare.
(value_field_bitfield): Declare.
* value.c (unpack_bits_as_long): Rename to...
(unpack_value_bits_as_long_1): ... this. Add embedded_offset and
value parameters. Return the extracted result in a new output
parameter. If the value contents are unavailable, return false,
otherwise return true.
(unpack_value_bits_as_long): New.
(unpack_field_as_long): Rename to...
(unpack_value_field_as_long_1): ... this. Add embedded_offset and
Add embedded_offset and value parameters. Return the extracted
result in a new output parameter. If the value contents are
unavailable, return false, otherwise return true.
(unpack_value_field_as_long): New.
(unpack_field_as_long_1): New.
(unpack_field_as_long): Reimplement as wrapper around
unpack_value_field_as_long_1.
(value_field_bitfield): New function.
* valops.c (value_fetch_lazy): When fetching a bitfield, use
unpack_value_bits_as_long. Mark the value as unavailable, if it
is unavailable.
* jv-valprint.c (java_print_value_fields): Use
value_field_bitfield.
* p-valprint.c (pascal_object_print_value_fields): Use
value_field_bitfield.
* cp-valprint.c (cp_print_value_fields): Use value_field_bitfield.
2011-02-14 11:25:59 +00:00
Pedro Alves
3158c6ed12
* value.c (get_internalvar_integer): Also return the int value of
...
TYPE_CODE_INT INTERNALVAR_VALUE values.
(set_internalvar): Don't special case TYPE_CODE_INT.
2011-02-14 11:25:12 +00:00
Pedro Alves
9fbdca0d66
gdb/
...
* value.c (struct internalvar) <enum internalvar_kind>: Remove
INTERNALVAR_POINTER.
<pointer>: Delete.
(value_of_internalvar): Remove INTERNALVAR_POINTER handling.
(set_internalvar): Remove special TYPE_CODE_PTR handling.
(preserve_one_internalvar): Remove INTERNALVAR_POINTER handling.
2011-02-14 11:24:19 +00:00
Pedro Alves
c8c1c22fea
gdb/
...
* value.h (value_available_contents_eq): Declare.
* value.c (find_first_range_overlap): New function.
(value_available_contents_eq): New function.
* valprint.c (val_print_array_elements): Use
value_available_contents_eq.
* ada-valprint.c (val_print_packed_array_elements): Use
value_available_contents_eq.
* jv-valprint.c (java_value_print): Use
value_available_contents_eq.
2011-02-14 11:23:33 +00:00
Pedro Alves
4e07d55ffb
Base support for <unavailable> value contents.
...
gdb/
* value.h (value_bytes_available): Declare.
(mark_value_bytes_unavailable): Declare.
* value.c (struct range): New struct.
(range_s): New typedef.
(ranges_overlap): New function.
(range_lessthan): New function.
(ranges_contain_p): New function.
(struct value) <unavailable>: New field.
(value_bytes_available): New function.
(mark_value_bytes_unavailable): New function.
(require_not_optimized_out): Constify parameter.
(require_available): New function.
(value_contents_all, value_contents): Require all bytes be
available.
(value_free): Free `unavailable'.
(value_copy): Copy `unavailable'.
* valprint.h (val_print_unavailable): Declare.
* valprint.c (valprint_check_validity): Rename `offset' parameter
to `embedded_offset'. If printing a scalar, check whether the
value chunk is available.
(val_print_unavailable): New.
(val_print_scalar_formatted): Check whether the value is
available.
* python/py-prettyprint.c (apply_val_pretty_printer): Refuse
pretty-printing unavailable values.
2011-02-14 11:10:53 +00:00
Pedro Alves
de4127a3b2
* cp-valprint.c (cp_print_value): Treat the 'skip' local as
...
boolean. Make sure to always pass a value that matches the
contents buffer to callees. Preserve `address' for following
iterations.
* value.c (value_contents_for_printing_const): New.
(value_address): Constify value argument.
* value.h (value_contents_for_printing_const): Declare.
(value_address): Constify value argument.
2011-01-25 15:18:36 +00:00
Jan Kratochvil
41e8491fdf
gdb/
...
Make value allocations more lazy.
* ada-lang.c (coerce_unspec_val_to_type): Use allocate_value_lazy
instead of allocate_value and set_value_lazy when possible.
* dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use allocate_value_lazy
instead of allocate_value and set_value_lazy.
* findvar.c (value_of_register_lazy): Likewise.
(read_var_value): Remove V preallocation, call just check_typedef in
advance. Move allocate_value to LOC_CONST, LOC_LABEL,
LOC_CONST_BYTES. Use allocate_value_lazy in LOC_STATIC, LOC_ARG,
LOC_REF_ARG, LOC_LOCAL, LOC_BLOCK. Set ADDR instead of
set_value_address and break in LOC_BLOCK. Use allocate_value_lazy and
remove lval_memory set in LOC_REGPARM_ADDR. Use allocate_value_lazy
in LOC_UNRESOLVED and LOC_OPTIMIZED_OUT. Add setting lval_memory at
the end, remove set_value_lazy there.
* valarith.c (value_subscripted_rvalue): Use allocate_value_lazy
instead of allocate_value and set_value_lazy when possible.
* valops.c (value_fetch_lazy): Do nop for value_optimized_out VAL.
* value.c (allocate_computed_value): Use allocate_value_lazy instead
of allocate_value and set_value_lazy.
(value_from_contents_and_address): Use allocate_value_lazy instead of
allocate_value and set_value_lazy when possible.
2011-01-12 16:10:05 +00:00
Michael Snyder
581e13c188
2011-01-11 Michael Snyder <msnyder@vmware.com>
...
* ui-file.c: Comment cleanup, mostly periods and spaces.
* ui-file.h: Ditto.
* ui-out.c: Ditto.
* ui-out.h: Ditto.
* utils.c: Ditto.
* v850-tdep.c: Ditto.
* valarith.c: Ditto.
* valops.c: Ditto.
* valprint.c: Ditto.
* valprint.h: Ditto.
* value.c: Ditto.
* value.h: Ditto.
* varobj.c: Ditto.
* varobj.h: Ditto.
* vax-tdep.c: Ditto.
* vec.c: Ditto.
* vec.h: Ditto.
* version.h: Ditto.
* windows-nat.c: Ditto.
* windows-tdep.c: Ditto.
* xcoffread.c: Ditto.
* xcoffsolib.c: Ditto.
* xml-support.c: Ditto.
* xstormy16-tdep.c: Ditto.
* xtensa-tdep.c: Ditto.
* xtensa-tdep.h: Ditto.
2011-01-12 01:23:29 +00:00
Michael Snyder
9b20d036b6
2011-01-11 Michael Snyder <msnyder@vmware.com>
...
* arm-tdep.c: Internationalization.
* c-lang.c: Ditto.
* charset.c: Ditto.
* fork-child.c: Ditto.
* nto-procfs.c: Ditto.
* ppc-sysv-tdep.c: Ditto.
* procfs.c: Ditto.
* remote-mips.c: Ditto.
* remote.c: Ditto.
* rs6000-nat.c: Ditto.
* rs6000-tdep.c: Ditto.
* target.c: Ditto.
* valops.c: Ditto.
* value.c: Ditto.
* xml-support.c: Ditto.
* mi/mi-cmd-break.c: Ditto.
* mi/mi-cmd-var.c: Ditto.
* mi/mi-interp.c: Ditto.
* mi/mi-main.c: Ditto.
2011-01-11 15:10:03 +00:00
Michael Snyder
3e43a32aaa
2011-01-05 Michael Snyder <msnyder@vmware.com>
...
* addrmap.c: Shorten lines of >= 80 columns.
* arch-utils.c: Ditto.
* arch-utils.h: Ditto.
* ax-gdb.c: Ditto.
* ax-general.c: Ditto.
* bcache.c: Ditto.
* blockframe.c: Ditto.
* breakpoint.c: Ditto.
* buildsym.c: Ditto.
* c-lang.c: Ditto.
* c-typeprint.c: Ditto.
* charset.c: Ditto.
* coffread.c: Ditto.
* command.h: Ditto.
* corelow.c: Ditto.
* cp-abi.c: Ditto.
* cp-namespace.c: Ditto.
* cp-support.c: Ditto.
* dbug-rom.c: Ditto.
* dbxread.c: Ditto.
* defs.h: Ditto.
* dfp.c: Ditto.
* dfp.h: Ditto.
* dictionary.c: Ditto.
* disasm.c: Ditto.
* doublest.c: Ditto.
* dwarf2-frame.c: Ditto.
* dwarf2expr.c: Ditto.
* dwarf2loc.c: Ditto.
* dwarf2read.c: Ditto.
* elfread.c: Ditto.
* eval.c: Ditto.
* event-loop.c: Ditto.
* event-loop.h: Ditto.
* exceptions.h: Ditto.
* exec.c: Ditto.
* expprint.c: Ditto.
* expression.h: Ditto.
* f-lang.c: Ditto.
* f-valprint.c: Ditto.
* findcmd.c: Ditto.
* frame-base.c: Ditto.
* frame-unwind.c: Ditto.
* frame-unwind.h: Ditto.
* frame.c: Ditto.
* frame.h: Ditto.
* gcore.c: Ditto.
* gdb-stabs.h: Ditto.
* gdb_assert.h: Ditto.
* gdb_dirent.h: Ditto.
* gdb_obstack.h: Ditto.
* gdbcore.h: Ditto.
* gdbtypes.c: Ditto.
* gdbtypes.h: Ditto.
* inf-ttrace.c: Ditto.
* infcall.c: Ditto.
* infcmd.c: Ditto.
* inflow.c: Ditto.
* infrun.c: Ditto.
* inline-frame.h: Ditto.
* language.c: Ditto.
* language.h: Ditto.
* libunwind-frame.c: Ditto.
* libunwind-frame.h: Ditto.
* linespec.c: Ditto.
* linux-nat.c: Ditto.
* linux-nat.h: Ditto.
* linux-thread-db.c: Ditto.
* machoread.c: Ditto.
* macroexp.c: Ditto.
* macrotab.c: Ditto.
* main.c: Ditto.
* maint.c: Ditto.
* mdebugread.c: Ditto.
* memattr.c: Ditto.
* minsyms.c: Ditto.
* monitor.c: Ditto.
* monitor.h: Ditto.
* objfiles.c: Ditto.
* objfiles.h: Ditto.
* osabi.c: Ditto.
* p-typeprint.c: Ditto.
* p-valprint.c: Ditto.
* parse.c: Ditto.
* printcmd.c: Ditto.
* proc-events.c: Ditto.
* procfs.c: Ditto.
* progspace.c: Ditto.
* progspace.h: Ditto.
* psympriv.h: Ditto.
* psymtab.c: Ditto.
* record.c: Ditto.
* regcache.c: Ditto.
* regcache.h: Ditto.
* remote-fileio.c: Ditto.
* remote.c: Ditto.
* ser-mingw.c: Ditto.
* ser-tcp.c: Ditto.
* ser-unix.c: Ditto.
* serial.c: Ditto.
* serial.h: Ditto.
* solib-frv.c: Ditto.
* solib-irix.c: Ditto.
* solib-osf.c: Ditto.
* solib-pa64.c: Ditto.
* solib-som.c: Ditto.
* solib-sunos.c: Ditto.
* solib-svr4.c: Ditto.
* solib-target.c: Ditto.
* solib.c: Ditto.
* somread.c: Ditto.
* source.c: Ditto.
* stabsread.c: Ditto.
* stabsread.c: Ditto.
* stack.c: Ditto.
* stack.h: Ditto.
* symfile-mem.c: Ditto.
* symfile.c: Ditto.
* symfile.h: Ditto.
* symmisc.c: Ditto.
* symtab.c: Ditto.
* symtab.h: Ditto.
* target-descriptions.c: Ditto.
* target-memory.c: Ditto.
* target.c: Ditto.
* target.h: Ditto.
* terminal.h: Ditto.
* thread.c: Ditto.
* top.c: Ditto.
* tracepoint.c: Ditto.
* tracepoint.h: Ditto.
* ui-file.c: Ditto.
* ui-file.h: Ditto.
* ui-out.h: Ditto.
* user-regs.c: Ditto.
* user-regs.h: Ditto.
* utils.c: Ditto.
* valarith.c: Ditto.
* valops.c: Ditto.
* valprint.c: Ditto.
* valprint.h: Ditto.
* value.c: Ditto.
* varobj.c: Ditto.
* varobj.h: Ditto.
* vec.h: Ditto.
* xcoffread.c: Ditto.
* xcoffsolib.c: Ditto.
* xcoffsolib.h: Ditto.
* xml-syscall.c: Ditto.
* xml-tdesc.c: Ditto.
2011-01-05 22:22:53 +00:00
Joel Brobecker
7b6bb8daac
run copyright.sh for 2011.
2011-01-01 15:34:07 +00:00
Stan Shebs
0914bcdbf6
2010-12-12 Stan Shebs <stan@codesourcery.com>
...
* value.c (value_of_internalvar): Add case for trace state
variables.
* gdb.trace/tsv.exp: Test print command on trace state variables.
2010-12-13 05:29:32 +00:00
Tom Tromey
8cf6f0b103
gdb
...
* opencl-lang.c (lval_func_check_synthetic_pointer): New
function.
* value.h (struct lval_funcs) <indirect, check_synthetic_pointer>:
New fields.
(value_bits_synthetic_pointer): Declare.
* value.c (value_bits_synthetic_pointer): New function.
* valprint.c (valprint_check_validity): Handle synthetic
pointers.
* valops.c (value_ind): Use new 'indirect' lval_funcs method.
* valarith.c (value_ptradd): Use set_value_component_location.
* p-valprint.c (pascal_object_print_value_fields): Handle
synthetic pointers.
* jv-valprint.c (java_print_value_fields): Handle synthetic
pointers.
* dwarf2read.c (dwarf_stack_op_name): Add
DW_OP_GNU_implicit_pointer.
(dwarf2_fetch_die_location_block): Add get_frame_pc, baton
arguments. Handle location lists.
(fill_in_loclist_baton): New function.
(dwarf2_symbol_mark_computed): Use it.
* dwarf2loc.h (dwarf2_find_location_expression): Declare.
(dwarf2_fetch_die_location_block): Add get_frame_pc, baton
arguments.
* dwarf2loc.c (dwarf2_find_location_expression): Rename from
find_location_expression. No longer static. Update all callers.
(dwarf_expr_frame_pc): New function.
(per_cu_dwarf_call): Add get_frame_pc, baton arguments. Update
all callers.
(struct piece_closure) <per_cu>: New field.
(allocate_piece_closure): Add per_cu argument.
(read_pieced_value): Handle DWARF_VALUE_IMPLICIT_POINTER.
(check_pieced_value_bits): Remove validity argument, add check_for
argument. Handle DWARF_VALUE_IMPLICIT_POINTER.
(check_pieced_value_validity, check_pieced_value_invalid):
Update.
(check_pieced_synthetic_pointer): New function.
(get_frame_address_in_block_wrapper): New function.
(indirect_pieced_value): New function.
(pieced_value_funcs): Update.
(invalid_synthetic_pointer): New function.
(dwarf2_evaluate_loc_desc_full): Rename from
dwarf2_evaluate_loc_desc. Add byte_offset argument.
(dwarf2_evaluate_loc_desc): Rewrite.
(dwarf2_loc_desc_needs_frame): Set new field on context.
(get_ax_pc): New function.
(disassemble_dwarf_expression): Handle
DW_OP_GNU_implicit_pointer.
* dwarf2expr.h (enum dwarf_value_location)
<DWARF_VALUE_IMPLICIT_POINTER>: New constant.
(struct dwarf_expr_context) <get_frame_pc>: New field.
(struct dwarf_expr_piece) <v.ptr>: New field.
* dwarf2expr.c (add_piece): Handle DWARF_VALUE_IMPLICIT_POINTER.
(execute_stack_op): Handle DW_OP_GNU_implicit_pointer.
* dwarf2-frame.c (no_get_frame_pc): New function.
(execute_stack_op): Set new field on context.
* cp-valprint.c (cp_print_value_fields): Handle synthetic
pointers.
gdb/testsuite
* gdb.dwarf2/implptr.exp: New file.
* gdb.dwarf2/implptr.c: New file.
* gdb.dwarf2/implptr.S: New file.
2010-11-29 21:18:16 +00:00
Tom Tromey
ba19bb4d8d
* value.c (value_entirely_optimized_out): Check the
...
'check_any_valid' field.
2010-11-17 19:53:37 +00:00
Jan Kratochvil
19f220c3b4
gdb/
...
* ada-lang.c (modify_general_field): Remove.
(make_array_descriptor): Replace all modify_general_field calls by
modify_field.
* value.c (modify_field): Update comment. New variable bytesize.
Normalize BITPOS. Initialize BYTESIZE, use it.
2010-11-16 22:13:02 +00:00
Doug Evans
4dfea56049
* value.c (set_value_enclosing_type): Renamed from
...
value_change_enclosing_type. All callers updated.
* value.h (set_value_enclosing_type): Update.
* valops.c (value_full_object): Always return a copy if we need to
make changes to the input value.
2010-11-10 17:47:23 +00:00
Ken Werner
c37f7098e9
gdb:
...
* value.h (value_non_lval): Declare.
* value.c (value_non_lval): New function.
* eval.c (evaluate_subexp_standard) <UNOP_POSTINCREMENT,
UNOP_POSTDECREMENT>: Call value_non_lval to ensure to return a
non-lvalue.
gdb/testsuite:
* gdb.base/exprs.exp: Add tests for pre-/post- in-/decrement operators.
2010-11-03 13:49:38 +00:00
Tom Tromey
38f12cfce2
gdb
...
* value.c (value_primitive_field): Take 'offset' into account for
packed field.
gdb/testsuite
* gdb.base/anon.exp: New file.
* gdb.base/anon.c: New file.
2010-09-30 18:58:08 +00:00
Tom Tromey
515ed53230
gdb
...
PR exp/11803:
* value.c (value_static_field): Use value_of_variable.
gdb/testsuite
PR exp/11803:
* gdb.threads/tls.exp: Use C++.
(check_thread_local): Use K::another_thread_local.
* gdb.threads/tls.c (class K): New.
(another_thread_local): Now a member of K.
(spin): Update. No longer K&R C.
2010-09-14 19:08:30 +00:00
Doug Evans
f3574227a8
* gdb_assert.h (gdb_assert_not_reached): New macro.
...
(gdb_assert_fail): Fix typo in comment.
* avr-tdep.c (avr_return_value): Use gdb_assert_not_reached instead of
gdb_assert (0).
* darwin-nat.c (darwin_check_new_threads): Ditto.
* dwarf2read.c (dwarf2_get_section_info): Ditto.
(munmap_section_buffer): Ditto.
* m32c-tdep.c (make_types): Ditto.
(m32c_decode_srcdest4, m32c_decode_sd23, m32c_frame_base): Ditto.
* macroexp.c (get_character_constant): Ditto.
(get_string_literal): Ditto.
* mep-tdep.c (mep_pseudo_cr_size): Ditto.
(mep_pseudo_cr_index, mep_register_type): Ditto.
(mep_pseudo_register_read, mep_pseudo_register_write): Ditto.
(mep_get_insn, mep_analyze_prologue): Ditto.
* objfiles.c (qsort_cmp): Ditto.
* prologue-value.c (pv_is_identical): Ditto.
* record.c (record_get_loc): Ditto.
* value.c (value_static_field): Ditto.
* xtensa-tdep.c (call0_track_op): Ditto.
2010-08-18 19:13:33 +00:00
Tom Tromey
06a64a0b78
gdb
...
* value.c (release_value): Clear 'next' pointer.
* breakpoint.c (watch_command_1): Add 'just_location' argument.
(watch_command_wrapper): Update.
(watch_maybe_just_location): New function.
(watch_command): Update.
(rwatch_command_wrapper): Update.
(rwatch_command): Update.
(awatch_command_wrapper): Update.
(awatch_command): Update.
(check_for_argument): New function.
(_initialize_breakpoint): Update help text.
gdb/testsuite
* gdb.base/help.exp: Update.
* gdb.base/watchpoint.exp (test_watchpoint_and_breakpoint): Delete
watchpoint.
(test_watch_location): New proc.
(test_watchpoint_in_big_blob): Delete watchpoint.
* gdb.base/watchpoint.c (func5): New function.
(main): Call it.
gdb/doc
* gdb.texinfo (Set Watchpoints): Document -location option.
2010-08-16 19:19:22 +00:00
Ken Werner
7346b668d7
gdb/ChangeLog:* gdb/valarith.c (vector_binop): New function.(scalar_binop): Likewise.(value_binop): Call scalar_binop or vector_binop depending on the types.* gdb/eval.c (ptrmath_type_p): Return 0 in case of TYPE_VECTOR.(evaluate_subexp_with_coercion): Add vector check to not convert vectorsto pointers.* gdb/value.c (coerce_array): Add vector check to not coerce vectors.testsuite/ChangeLog:* gdb.base/Makefile.in (EXECUTABLES): Add gnu_vector.* gdb.base/gnu_vector.c: New File.* gdb.base/gnu_vector.exp: Likewise.
2010-08-11 16:48:26 +00:00
Thiago Jung Bauermann
0cf6dd1543
2010-07-07 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
...
Thiago Jung Bauermann <bauerman@br.ibm.com>
Support for hw accelerated condition watchpoints in booke powerpc.
* breakpoint.c (fetch_watchpoint_value): Rename to fetch_subexp_value
and move to eval.c. Change callers.
(insert_bp_location): Pass watchpoint condition in
target_insert_watchpoint.
(remove_breakpoint_1) Pass watchpoint condition in
target_remove_watchpoint.
(watchpoint_locations_match): Call
target_can_accel_watchpoint_condition.
* eval.c: Include wrapper.h.
(fetch_subexp_value): Moved from breakpoint.c.
* ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint):
Formatting fix.
(can_use_watchpoint_cond_accel): New function.
(calculate_dvc): Likewise.
(num_memory_accesses): Likewise.
(check_condition): Likewise.
(ppc_linux_can_accel_watchpoint_condition): Likewise
(ppc_linux_insert_watchpoint): Call can_use_watchpoint_cond_accel,
check_condition and calculate_dvc.
(ppc_linux_remove_watchpoint): Likewise.
(_initialize_ppc_linux_nat): Set to_can_accel_watchpoint_condition to
ppc_linux_can_accel_watchpoint_condition
* target.c (debug_to_insert_watchpoint): Add argument for watchpoint
condition.
(debug_to_remove_watchpoint): Likewise.
(debug_to_can_accel_watchpoint_condition): New function.
(update_current_target): Set to_can_accel_watchpoint_condition.
(setup_target_debug): Set to_can_accel_watchpoint_condition.
* target.h: Add opaque declaration for struct expression.
(struct target_ops) <to_insert_watchpoint>,
<to_remove_watchpoint>: Add new arguments to pass the watchpoint
<to_can_accel_watchpoint_condition>: New member.
condition. Update all callers and implementations.
(target_can_accel_watchpoint_condition): New macro.
* value.c (free_value_chain): New function.
* value.h (fetch_subexp_value): New prototype.
(free_value_chain): Likewise.
2010-07-07 16:15:18 +00:00
Tom Tromey
b65c7efe97
* value.h (struct lval_funcs) <check_any_valid>: Rename from
...
check_all_valid.
* value.c (value_entirely_optimized_out): Invert result. Update
for new function name.
2010-07-01 15:21:11 +00:00
Phil Muldoon
595939dea1
2010-06-28 Phil Muldoon <pmuldoon@redhat.com>
...
Tom Tromey <tromey@redhat.com>
Thiago Jung Bauermann <bauerman@br.ibm.com>
* value.c (pack_unsigned_long): New function.
(value_from_ulongest): New function.
* value.h (value_from_ulongest): Declare.
* python/python.c (_initialize_python): Call
gdbpy_initialize_thread and gdbpy_initialize_inferior.
* python/python-internal.h: Define thread_object.
(gdbpy_inferiors, gdbpy_selected_thread)
(frame_info_to_frame_object, create_thread_object)
(find_thread_object, find_inferior_object)
(gdbpy_initialize_thread, gdbpy_initialize_inferiors)
(gdbpy_is_value_object, get_addr_from_python): Declare.
* python/py-value.c (builtin_type_upylong): Define.
(convert_value_from_python): Add logic for ulongest.
(gdbpy_is_value_object): New function.
* python/py-utils.c (get_addr_from_python): New function.
* python/py-frame.c (frame_info_to_frame_object): Return a PyObject.
(gdbpy_selected_frame): Use PyObject over frame_info.
* Makefile.in (SUBDIR_PYTHON_OBS): Add py-inferior and
py-infthread.
(SUBDIR_PYTHON_SRCS): Likewise.
(py-inferior.o): New Rule.
(py-infthread.o): New Rule.
* python/py-inferior.c: New File.
* python/py-infthread.c: New File.
2010-06-28 Phil Muldoon <pmuldoon@redhat.com>
Tom Tromey <tromey@redhat.com>
Thiago Jung Bauermann <bauerman@br.ibm.com>
* gdb.texinfo (Inferiors In Python): New node.
* gdb.texinfo (Threads In Python): New node.
2010-06-28 Phil Muldoon <pmuldoon@redhat.com>
Tom Tromey <tromey@redhat.com>
Thiago Jung Bauermann <bauerman@br.ibm.com>
* gdb.python/py-inferior.c: New File.
* gdb.python/py-infthread.c: New File.
* gdb.python/py-inferior.exp: New File.
* gdb.python/py-infthread.exp: New File.
2010-06-28 21:16:04 +00:00
Doug Evans
1596cb5d60
* value.c (value_static_field): Use `switch' instead of `if'.
...
Assert-fail if passed invalid TYPE_FIELD_LOC_KIND.
2010-06-27 16:40:14 +00:00
Tom Tromey
0e03807e1c
gdb
...
PR gdb/9977, PR exp/11636:
* value.h (value_offset): Update.
(struct lval_funcs) <check_validity>: New field.
<copy_closure>: Make argument const.
(value_computed_closure): Update.
(value_contents_for_printing): Declare.
(value_bits_valid): Likewise.
(val_print): Likewise.
(set_value_component_location): Update.
(value_entirely_optimized_out): Declare.
* value.c (value_offset): Argument now const.
(require_not_optimized_out): New function.
(value_contents_for_printing): New function.
(value_contents_all): Call require_not_optimized_out.
(value_contents): Likewise.
(value_bits_valid): New function.
(value_computed_closure): Argument now const.
(set_value_component_location): Make 'whole' argument const.
(value_entirely_optimized_out): New function.
(value_bitsize): Argument now 'const'.
(value_bitpos): Likewise.
(value_type): Likewise.
* valprint.h (val_print_array_elements): Update.
* valprint.c (val_print): Add 'val' argument. Use
valprint_check_validity.
(valprint_check_validity): New function.
(value_check_printable): Use value_entirely_optimized_out.
(common_val_print): Update.
(value_print): Likewise.
(val_print_array_elements): Add 'val' argument.
* valops.c (value_fetch_lazy): Use value_contents_for_printing,
value_bits_valid. Reinit frame cache for lval_computed.
* sh64-tdep.c (sh64_do_register): Update.
* scm-valprint.c (scm_val_print): Add 'val' argument.
* scm-lang.h (scm_val_print): Update.
* python/python.h (apply_val_pretty_printer): Update.
* python/py-prettyprint.c (apply_val_pretty_printer): Add 'val'
argument. Call set_value_component_location.
* printcmd.c (print_scalar_formatted): Update.
* p-valprint.c (pascal_val_print): Add 'val' argument.
(pascal_object_print_value_fields): Likewise.
(pascal_object_print_value): Likewise.
(pascal_object_print_static_field): Update.
* p-lang.h (pascal_val_print): Update.
(pascal_object_print_value_fields): Update.
* mt-tdep.c (mt_registers_info): Update.
* mi/mi-main.c (get_register): Update.
(mi_cmd_data_evaluate_expression): Use common_val_print.
* m2-valprint.c (m2_print_array_contents): Add 'val' argument.
(m2_print_unbounded_array): Likewise.
(m2_val_print): Likewise.
* m2-lang.h (m2_val_print): Update.
* language.h (struct language_defn) <la_val_print>: Add 'val'
argument.
(LA_VAL_PRINT): Likewise.
* language.c (unk_lang_val_print): Add 'val' argument.
* jv-valprint.c (java_print_value_fields): Add 'val' argument.
(java_val_print): Likewise.
* jv-lang.h (java_val_print): Add 'val' argument.
* infcmd.c (default_print_registers_info): Update.
* f-valprint.c (f77_print_array_1): Add 'val' argument.
(f77_print_array): Likewise.
(f_val_print): Likewise.
* f-lang.h (f_val_print): Add 'val' argument.
* dwarf2loc.c (read_pieced_value): Use value_bitsize and
value_bitpos.
<DWARF_VALUE_OPTIMIZED_OUT>: Don't print warning. Call
set_value_optimized_out.
(write_pieced_value): Use value_bitsize and value_bitpos.
<default>: Don't exit loop.
(check_pieced_value_validity): New function.
(pieced_value_funcs): Reference check_pieced_value_validity,
check_pieced_value_invalid.
(copy_pieced_value_closure): Update.
(check_pieced_value_bits): New function.
(check_pieced_value_invalid): New function.
* d-valprint.c (dynamic_array_type): Add 'val' argument.
(d_val_print): Likewise.
* d-lang.h (d_val_print): Update.
* cp-valprint.c (cp_print_value_fields): Add 'val' argument.
(cp_print_value_fields_rtti): Likewise.
(cp_print_value): Likewise.
(cp_print_static_field): Update.
* c-valprint.c (c_val_print): Add 'val' argument.
(c_value_print): Update.
* c-lang.h (c_val_print): Update.
(cp_print_value_fields): Likewise.
(cp_print_value_fields_rtti): Likewise.
* ada-valprint.c (struct ada_val_print_args): Remove.
(val_print_packed_array_elements): Add 'val' argument.
(ada_val_print): Likewise. Rewrite.
(ada_val_print_stub): Remove.
(ada_val_print_array): Add 'val' argument.
(ada_val_print_1): Likewise.
(print_variant_part): Likewise.
(ada_value_print): Update.
(print_record): Add 'val' argument.
(print_field_values): Likewise.
* ada-lang.h (ada_val_print): Update.
gdb/testsuite
PR gdb/9977, PR exp/11636::
* gdb.dwarf2/pieces.exp (pieces_test_f3): Remove kfail.
(pieces_test_f6): Update expected output.
2010-06-11 15:36:10 +00:00
Michael Snyder
a109c7c104
2010-05-17 Michael Snyder <msnyder@vmware.com>
...
* 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.
2010-05-17 18:48:52 +00:00
Michael Snyder
8ea1369558
2010-05-06 Michael Snyder <msnyder@vmware.com>
...
* auxv.c (target_auxv_search): Delete unused variable.
* blockframe.c (get_frame_block): Delete unused variable.
* regcache.c (regcache_cpy): Delete unused variable.
(regcache_cpy_no_passthrough): Delete unused variable.
* charset.c (wchar_iterate): Delete unused variable.
(find_charset_names): Delete unused variable.
(_initialize_charset): Delete unused variable.
* disasm.c (do_mixed_source_and_assembly):
Delete unused variable.
* source.c (set_default_source_symtab_and_line):
Delete unused variable.
(set_substitute_path_command): Delete unused variable.
* value.c (preserve_values): Delete unused variable.
(value_from_double): Delete unused variable.
2010-05-06 18:07:08 +00:00
Stan Shebs
52e9fde813
2010-03-22 Stan Shebs <stan@codesourcery.com>
...
* value.c (value_static_field): Be lazy about the field's value.
2010-03-22 18:47:00 +00:00
Keith Seitz
94af9270db
dwarf2_physname patchset:
...
Based on work from Daniel Jacobowitz <dan@codesourcery.com>
* c-typeprint.c (cp_type_print_method_args): For non-static methods,
print out const or volatile qualifiers, too.
(c_type_print_args): Add parameters show_artificial and language.
Skip artificial parameters when requested.
Use the appropriate language printer.
(c_type_print_varspec): Tell c_type_print_args to skip artificial
parameters and pass language_c.
* dwarf2read.c (die_list): New file global.
(struct partial_die_info): Update comments for name field.
(pdi_needs_namespace): Renamed to ...
(die_needs_namespace): ... this. Rewrite.
(dwarf2_linkage_name): Remove.
(add_partial_symbol): Do not predicate the call to
partial_die_full_name based on pdi_needs_namespace.
Remove call to cp_check_possible_namespace_symbols and associated
outdated comments.
(guess_structure_name): Do not inspect child subprogram DIEs.
(dwarf2_fullname): Update comments.
Use die_needs_namespace to assist in computing the name.
(read_func_scope): Use dwarf2_name to get the DIE's name.
Use dwarf2_physname to get the "linkage name" of the DIE.
(dwarf2_add_member_field): Use dwarf2_physname instead of
dwarf2_linkage_name.
(read_structure_type): For structs and classes, set TYPE_NAME, too.
(determine_class): Remove.
(read_partial_die): Ignore DW_AT_MIPS_linkage_name for all languages
except Ada.
(new_symbol): Unconditionally call dwarf2_name.
Compute the "linkage name" using dwarf2_physname.
Use dwarf2_name instead of dwarf2_full_name for enumerator DIEs.
When determining to scan for anonymous C++ namespaces, ignore
the linkage name.
(dwarf2_physname): New function.
(dwarf2_full_name): Move content to new function and call
that.
(dwarf2_compute_name): "New" function.
(_initialize_dwarf2_read): Initialize die_list.
* gnu-v3-eabi.c (gnu_v3_find_method_in): Remove unused variable
physname.
(gnu_v3_print_method_ptr): Use the physname for virtual methods
without a demangled name.
Print out type information for non-virtual methods.
* linespec.c (decode_line_1): Force ANY string using "::" (or
"." for java) to use decode_compound, and clean up any stray quoting.
If we found a file symtab, re-evaluate whether the remainder is_quoted.
(decode_compound): Stop consuming at an open parenthesis.
Keep template parameters.
Keep any overload information.
Keep keywords like "const".
Remove paren_pointer.
Move is_quoted check from set_flags to here.
Remove #if 0 code from 2000. Ten years is long enough.
(find_method): Before comparing symbol names, canonicalize the string
from the user.
If a specific overload is requested, find it. Otherwise throw an error.
(find_method_overload_end): New function.
(set_flags): Remove.
(decode_compound): Assume that parentheses are matched.
It's a lot easier.
* symtab.c (symbol_find_demangled_name): Add DMGL_VERBOSE flag
to cplus_demangle.
* linespec.c (decode_line_1): Keep important keywords like
"const" and "volatile".
* symtab.h (SYMBOL_CPLUS_DEMANGLED_NAME): Remove.
* typeprint.h (c_type_print_args): Add declaration.
* ui-file.c (do_ui_file_obsavestring): New function.
(ui_file_obsavestring): New function.
* ui-file.h (ui_file_obsavestring): Add declaration.
* valops.c (find_overload_match): Resolve the object to
a non-pointer type.
If the object is a data member, search the object for the member
and return with staticp set.
Use SYMBOL_NATURAL_NAME instead of SYMBOL_CPLUS_DEMANGLED_NAME.
Do not attempt to extract a function name from non-function types.
If the extracted function name and the original name are the same,
we don't have a C++ method.
From Jan Kratochvil <jan.kratochvil@redhat.com>:
* dwarf2read.c (new_symbol <DW_TAG_enumerator>): Call dwarf2_full_name.
* ada-lang.c (ada_lookup_symbol): Remove linkage_name parameters
and arguments from symbol lookups.
* ax-gdb.c (gen_expr): Likewise.
* cp-namespace.c (cp_lookup_symbol_nonlocal, lookup_namespace_scope,
cp_lookup_symbol_namespace, lookup_symbol_file, lookup_nested_type,
lookup_possible_namespace_symbol): Likewise.
* cp-support.c (read_in_psymtabs): Likewise.
* cp-support.h (cp_lookup_symbol_nonlocal): Likewise.
* language.h (la_lookup_symbol_nonlocal): Likewise.
* scm-valprint.c (scm_inferior_print): Likewise.
* solib-darwin.c (darwin_relocate_section_addresses): Likewise.
* solib-svr.c (elf_lookup_lib): Likewise.
* solib.c (show_auto_solib_add): Likewise.
* solist.h (lookup_lib_global, solib_global_lookup): Likewise.
* symmisc.c (maintenance_check_symtabs): Likewise.
* symtab.c (lookup_symbol_in_language, lookup_symbol_aux,
lookup_symbol_aux_local, lookup_symbol_aux_block,
lookup_symbol_from_objfile, lookup_symbol_aux_symtabs,
lookup_symbol_aux_psymtabs,basic_lookup_symbol_nonlocal,
lookup_symbol_static, lookup_symbol_global, symbol_matches_domain,
basic_lookup_transparent_type, find_main_psymtab,
lookup_block_symbol): Likewise.
* symtab.h (basic_lookp_symbol_nonlocal, lookup_symbol_static,
lookup_symbol_global, lookup_symbol_aux_block,
lookup_symbol_partial_symbol, lookup_block_symbol,
lookup_global_symbol, value_maybe_namespace_elt): Likewise.
2010-03-09 18:09:08 +00:00
Jan Kratochvil
c54eabfaa8
gdb/
...
* gdbtypes.c (check_typedef): New comment on type length.
* value.c (allocate_value_lazy): Remove the unused atype variable. New
comment on type length.
(value_primitive_field): Keep the original TYPE value, new comment.
gdb/testsuite/
* gdb.mi/var-cmd.c (do_bitfield_tests): Change "V.sharable" type to
"uint_for_mi_testing".
2010-01-03 18:55:32 +00:00
Joel Brobecker
4c38e0a4fc
Update copyright year in most headers.
...
Automatic update by copyright.sh.
2010-01-01 07:32:07 +00:00
Vladimir Prus
9e19b45e2e
PR gdb/10884
...
* value.c (value_primitive_field): Call check_typedef
on the type.
2009-12-21 09:50:31 +00:00
Doug Evans
4e5d721fc0
Implement TARGET_OBJECT_STACK_MEMORY.
...
* NEWS: Add note on new "set stack-cache" option.
* corefile.c (read_stack): New function.
* dcache.c (dcache_struct): New member ptid.
(dcache_enable_p): Mark as obsolete.
(show_dcache_enabled_p): Flag option as deprecated.
(dcache_invalidate): Update ptid.
(dcache_invalidate_line): New function.
(dcache_read_line): No longer check cacheable attribute, stack
accesses get cached despite attribute.
(dcache_init): Set ptid.
(dcache_xfer_memory): Flush cache if from different ptid than before.
Update cache after write.
(dcache_update): New function.
(dcache_info): Report ptid.
(_initialize_dcache): Update text for `remotecache' to indicate it
is obsolete.
* dcache.h (dcache_update): Declare.
* dwarf2loc.c (dwarf2_evaluate_loc_desc): Mark values on stack with
set_value_stack.
* frame-unwind.c (frame_unwind_got_memory): Ditto.
* gdbcore.h (read_stack): Declare.
* memattr.c (mem_enable_command): Call target_dcache_invalidate
instead of dcache_invalidate.
(mem_disable_command, mem_delete_command): Ditto.
* target.c (stack_cache_enabled_p_1): New static global.
(stack_cache_enabled_p): New static global.
(set_stack_cache_enabled_p): New function.
(show_stack_cache_enabled_p): New function.
(target_dcache): Make static.
(target_dcache_invalidate): New function.
(target_load, target_resume): Call target_dcache_invalidate
instead of dcache_invalidate.
(memory_xfer_partial): New arg object, all callers updated.
Check for existing inferior before calling dcache routines.
When writing non-TARGET_OBJECT_STACK_MEMORY, notify dcache.
(target_xfer_partial): Call memory_xfer_partial for
TARGET_OBJECT_STACK_MEMORY.
(target_read_stack): New function.
(initialize_targets): Install new option `stack-cache'.
* target.h: Remove #include of dcache.h.
(enum target_object): New value TARGET_OBJECT_STACK_MEMORY.
(target_dcache): Delete.
(target_dcache_invalidate): Declare.
(target_read_stack): Declare.
* top.c (prepare_execute_command): New function.
(execute_command): Call prepare_execute_command
instead of free_all_values.
* top.h (prepare_execute_command): Declare.
* valops.c (get_value_at): New function.
(value_at): Guts moved to get_value_at.
(value_at_lazy): Similarly.
(value_fetch_lazy): Call read_stack for stack values.
* value.c (struct value): New member `stack'.
(value_stack, set_value_stack): New functions.
* value.h (value_stack, set_value_stack): Declare.
* mi/mi-main.c (mi_cmd_execute): Call prepare_execute_command
instead of free_all_values.
doc/
* gdb.texinfo (Caching Data of Remote Targets): Update text.
Mark `set/show remotecache' options as obsolete.
Document new `set/show stack-cache' option.
Update text for `info dcache'.
2009-08-31 20:18:46 +00:00
Daniel Jacobowitz
4a76eae594
PR gdb/10565
...
* value.c (value_primitive_field): Do not save value_offset for
bitfields.
(unpack_bits_as_long): Do not read an entire ULONGEST.
testsuite/
PR gdb/10565
* gdb.base/bitfields.c (struct container, container): New.
(main): Initialize it and call break5.
* gdb.base/bitfields.exp (bitfield_at_offset): New test.
2009-08-28 18:50:49 +00:00
Doug Evans
725e88af6f
* value.c (free_all_values): Tweak comment.
2009-08-27 23:37:35 +00:00
Ulrich Weigand
cab0c772ae
ChangeLog:
...
* value.c (enum internalvar_kind): Replace INTERNALVAR_SCALAR by
INTERNALVAR_INTEGER and INTERNALVAR_POINTER.
(union internalvar_data): Replace "scalar" member by "integer"
and "pointer".
(value_of_internalvar): Handle INTERNALVAR_INTEGER and
INTERNALVAR_POINTER instead of INTERNALVAR_SCALAR.
(get_internalvar_integer): Likewise.
(set_internalvar): Likewise.
(set_internalvar_integer): Likewise.
(preserve_one_internalvar): Likewise.
(value_from_pointer): Handle typedef'd pointer types.
testsuite/ChangeLog:
2009-08-19 Doug Evans <dje@google.com>
* gdb.base/gdbvars.c: New file.
* gdb.base/gdbvars.exp: Test convenience vars with program variables.
2009-08-19 13:00:29 +00:00
Tom Tromey
4e7a5ef5a8
* varobj.c (update_dynamic_varobj_children): Don't use
...
value_copy.
* value.h: (preserve_one_value): Declare.
(value_prepend_to_list, value_remove_from_list): Remove.
* value.c (preserve_one_value): No longer static.
(preserve_values): Call preserve_python_values.
(value_prepend_to_list): Remove.
(value_remove_from_list): Remove.
* python/python.h (values_in_python): Don't declare.
(preserve_python_values): Declare.
* python/python-value.c (values_in_python): Change type. Move
lower. Now static.
(struct value_object): Add struct tag.
<next, prev>: New fields.
(valpy_dealloc): Update.
(note_value): New function.
(valpy_new): Use value_incref, note_value.
(preserve_python_values): New function.
(valpy_positive): Don't use value_copy.
(value_to_value_object): Use value_incref, note_value.
(convert_value_from_python): Update comment.
2009-08-13 18:39:20 +00:00
Daniel Jacobowitz
4ea48cc1cd
gdb/
...
* valops.c (value_fetch_lazy): Handle bitfields explicitly.
(value_assign): Remove unnecessary FIXME. Honor the container
type of bitfields if possible.
* value.c (struct value): Add parent field.
(value_parent): New function.
(value_free): Free the parent also.
(value_copy): Copy the parent also.
(value_primitive_field): Do not read the contents of a lazy
value to create a child bitfield value. Set bitpos and offset
according to the container type if possible.
(unpack_bits_as_long): Rename from unpack_field_as_long. Take
field_type, bitpos, and bitsize instead of type and fieldno.
(unpack_field_as_long): Use unpack_bits_as_long.
* value.h (value_parent, unpack_bits_as_long): New prototypes.
2009-07-21 18:15:32 +00:00
Daniel Jacobowitz
828d3400fb
gdb/
...
* value.c (struct value): Add reference_count field.
(allocate_value_lazy): Initialize reference_count.
(value_incref): New function.
(value_free): Check the reference count.
* value.h (value_incref): New prototype.
2009-07-21 18:12:40 +00:00
Ulrich Weigand
e17a411335
* defs.h (extract_signed_integer, extract_unsigned_integer,
...
extract_long_unsigned_integer, store_signed_integer,
store_unsigned_integer): Add BYTE_ORDER parameter.
* findvar.c (extract_signed_integer, extract_unsigned_integer,
extract_long_unsigned_integer, store_signed_integer,
store_unsigned_integer): Add BYTE_ORDER parameter. Use it
instead of current_gdbarch.
* gdbcore.h (read_memory_integer, safe_read_memory_integer,
read_memory_unsigned_integer, write_memory_signed_integer,
write_memory_unsigned_integer): Add BYTE_ORDER parameter.
* corefile.c (struct captured_read_memory_integer_arguments): Add
BYTE_ORDER member.
(safe_read_memory_integer): Add BYTE_ORDER parameter. Store it into
struct captured_read_memory_integer_arguments.
(do_captured_read_memory_integer): Pass it to read_memory_integer.
(read_memory_integer): Add BYTE_ORDER parameter. Pass it to
extract_signed_integer.
(read_memory_unsigned_integer): Add BYTE_ORDER parameter. Pass it to
extract_unsigned_integer.
(write_memory_signed_integer): Add BYTE_ORDER parameter. Pass it
to store_signed_integer.
(write_memory_unsigned_integer): Add BYTE_ORDER parameter. Pass it
to store_unsigned_integer.
* target.h (get_target_memory_unsigned): Add BYTE_ORDER parameter.
* target.c (get_target_memory_unsigned): Add BYTE_ORDER parameter.
Pass it to extract_unsigned_integer.
Update calls to extract_signed_integer, extract_unsigned_integer,
extract_long_unsigned_integer, store_signed_integer,
store_unsigned_integer, read_memory_integer,
read_memory_unsigned_integer, safe_read_memory_integer,
write_memory_signed_integer, write_memory_unsigned_integer, and
get_target_memory_unsigned to pass byte order:
* ada-lang.c (ada_value_binop): Update.
* ada-valprint.c (char_at): Update.
* alpha-osf1-tdep.c (alpha_osf1_sigcontext_addr): Update.
* alpha-tdep.c (alpha_lds, alpha_sts, alpha_push_dummy_call,
alpha_extract_return_value, alpha_read_insn,
alpha_get_longjmp_target): Update.
* amd64-linux-tdep.c (amd64_linux_sigcontext_addr): Update.
* amd64obsd-tdep.c (amd64obsd_supply_uthread,
amd64obsd_collect_uthread, amd64obsd_trapframe_cache): Update.
* amd64-tdep.c (amd64_push_dummy_call, amd64_analyze_prologue,
amd64_frame_cache, amd64_sigtramp_frame_cache, fixup_riprel,
amd64_displaced_step_fixup): Update.
* arm-linux-tdep.c (arm_linux_sigreturn_init,
arm_linux_rt_sigreturn_init, arm_linux_supply_gregset): Update.
* arm-tdep.c (thumb_analyze_prologue, arm_skip_prologue,
arm_scan_prologue, arm_push_dummy_call, thumb_get_next_pc,
arm_get_next_pc, arm_extract_return_value, arm_store_return_value,
arm_return_value): Update.
* arm-wince-tdep.c (arm_pe_skip_trampoline_code): Update.
* auxv.c (default_auxv_parse): Update.
* avr-tdep.c (avr_address_to_pointer, avr_pointer_to_address,
avr_scan_prologue, avr_extract_return_value,
avr_frame_prev_register, avr_push_dummy_call): Update.
* bsd-uthread.c (bsd_uthread_check_magic, bsd_uthread_lookup_offset,
bsd_uthread_wait, bsd_uthread_thread_alive,
bsd_uthread_extra_thread_info): Update.
* c-lang.c (c_printstr, print_wchar): Update.
* cp-valprint.c (cp_print_class_member): Update.
* cris-tdep.c (cris_sigcontext_addr, cris_sigtramp_frame_unwind_cache,
cris_push_dummy_call, cris_scan_prologue, cris_store_return_value,
cris_extract_return_value, find_step_target, dip_prefix,
sixteen_bit_offset_branch_op, none_reg_mode_jump_op,
move_mem_to_reg_movem_op, get_data_from_address): Update.
* dwarf2expr.c (dwarf2_read_address, execute_stack_op): Update.
* dwarf2-frame.c (execute_cfa_program): Update.
* dwarf2loc.c (find_location_expression): Update.
* dwarf2read.c (dwarf2_const_value): Update.
* expprint.c (print_subexp_standard): Update.
* findvar.c (unsigned_pointer_to_address, signed_pointer_to_address,
unsigned_address_to_pointer, address_to_signed_pointer,
read_var_value): Update.
* frame.c (frame_unwind_register_signed,
frame_unwind_register_unsigned, get_frame_memory_signed,
get_frame_memory_unsigned): Update.
* frame-unwind.c (frame_unwind_got_constant): Update.
* frv-linux-tdep.c (frv_linux_pc_in_sigtramp,
frv_linux_sigcontext_reg_addr, frv_linux_sigtramp_frame_cache):
Update.
* frv-tdep.c (frv_analyze_prologue, frv_skip_main_prologue,
frv_extract_return_value, find_func_descr,
frv_convert_from_func_ptr_addr, frv_push_dummy_call): Update.
* f-valprint.c (f_val_print): Update.
* gnu-v3-abi.c (gnuv3_decode_method_ptr, gnuv3_make_method_ptr):
Update.
* h8300-tdep.c (h8300_is_argument_spill, h8300_analyze_prologue,
h8300_push_dummy_call, h8300_extract_return_value,
h8300h_extract_return_value, h8300_store_return_value,
h8300h_store_return_value): Update.
* hppabsd-tdep.c (hppabsd_find_global_pointer): Update.
* hppa-hpux-nat.c (hppa_hpux_fetch_register, hppa_hpux_store_register):
Update.
* hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline,
hppa64_hpux_in_solib_call_trampoline,
hppa_hpux_in_solib_return_trampoline, hppa_hpux_skip_trampoline_code,
hppa_hpux_sigtramp_frame_unwind_cache,
hppa_hpux_sigtramp_unwind_sniffer, hppa32_hpux_find_global_pointer,
hppa64_hpux_find_global_pointer, hppa_hpux_search_pattern,
hppa32_hpux_search_dummy_call_sequence,
hppa64_hpux_search_dummy_call_sequence, hppa_hpux_supply_save_state,
hppa_hpux_unwind_adjust_stub): Update.
* hppa-linux-tdep.c (insns_match_pattern,
hppa_linux_find_global_pointer): Update.
* hppa-tdep.c (hppa_in_function_epilogue_p, hppa32_push_dummy_call,
hppa64_convert_code_addr_to_fptr, hppa64_push_dummy_call,
skip_prologue_hard_way, hppa_frame_cache, hppa_fallback_frame_cache,
hppa_pseudo_register_read, hppa_frame_prev_register_helper,
hppa_match_insns): Update.
* hpux-thread.c (hpux_thread_fetch_registers): Update.
* i386-tdep.c (i386bsd_sigcontext_addr): Update.
* i386-cygwin-tdep.c (core_process_module_section): Update.
* i386-darwin-nat.c (i386_darwin_sstep_at_sigreturn,
amd64_darwin_sstep_at_sigreturn): Update.
* i386-darwin-tdep.c (i386_darwin_sigcontext_addr,
amd64_darwin_sigcontext_addr): Likewise.
* i386-linux-nat.c (i386_linux_sigcontext_addr): Update.
* i386nbsd-tdep.c (i386nbsd_sigtramp_cache_init): Update.
* i386-nto-tdep.c (i386nto_sigcontext_addr): Update.
* i386obsd-nat.c (i386obsd_supply_pcb): Update.
* i386obsd-tdep.c (i386obsd_supply_uthread, i386obsd_collect_uthread,
i386obsd_trapframe_cache): Update.
* i386-tdep.c (i386_displaced_step_fixup, i386_follow_jump,
i386_analyze_frame_setup, i386_analyze_prologue,
i386_skip_main_prologue, i386_frame_cache, i386_sigtramp_frame_cache,
i386_get_longjmp_target, i386_push_dummy_call,
i386_pe_skip_trampoline_code, i386_svr4_sigcontext_addr,
i386_fetch_pointer_argument): Update.
* i387-tdep.c (i387_supply_fsave): Update.
* ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Update.
* ia64-tdep.c (ia64_pseudo_register_read, ia64_pseudo_register_write,
examine_prologue, ia64_frame_cache, ia64_frame_prev_register,
ia64_sigtramp_frame_cache, ia64_sigtramp_frame_prev_register,
ia64_access_reg, ia64_access_rse_reg, ia64_libunwind_frame_this_id,
ia64_libunwind_frame_prev_register,
ia64_libunwind_sigtramp_frame_this_id,
ia64_libunwind_sigtramp_frame_prev_register, ia64_find_global_pointer,
find_extant_func_descr, find_func_descr,
ia64_convert_from_func_ptr_addr, ia64_push_dummy_call, ia64_dummy_id,
ia64_unwind_pc): Update.
* iq2000-tdep.c (iq2000_pointer_to_address, iq2000_address_to_pointer,
iq2000_scan_prologue, iq2000_extract_return_value,
iq2000_push_dummy_call): Update.
* irix5nat.c (fill_gregset): Update.
* jv-lang.c (evaluate_subexp_java): Update.
* jv-valprint.c (java_value_print): Update.
* lm32-tdep.c (lm32_analyze_prologue, lm32_push_dummy_call,
lm32_extract_return_value, lm32_store_return_value): Update.
* m32c-tdep.c (m32c_push_dummy_call, m32c_return_value,
m32c_skip_trampoline_code, m32c_m16c_address_to_pointer,
m32c_m16c_pointer_to_address): Update.
* m32r-tdep.c (m32r_store_return_value, decode_prologue,
m32r_skip_prologue, m32r_push_dummy_call, m32r_extract_return_value):
Update.
* m68hc11-tdep.c (m68hc11_pseudo_register_read,
m68hc11_pseudo_register_write, m68hc11_analyze_instruction,
m68hc11_push_dummy_call): Update.
* m68linux-tdep.c (m68k_linux_pc_in_sigtramp,
m68k_linux_get_sigtramp_info, m68k_linux_sigtramp_frame_cache):
Update.
* m68k-tdep.c (m68k_push_dummy_call, m68k_analyze_frame_setup,
m68k_analyze_register_saves, m68k_analyze_prologue, m68k_frame_cache,
m68k_get_longjmp_target): Update.
* m88k-tdep.c (m88k_fetch_instruction): Update.
* mep-tdep.c (mep_pseudo_cr32_read, mep_pseudo_csr_write,
mep_pseudo_cr32_write, mep_get_insn, mep_push_dummy_call): Update.
* mi/mi-main.c (mi_cmd_data_write_memory): Update.
* mips-linux-tdep.c (mips_linux_get_longjmp_target, supply_32bit_reg,
mips64_linux_get_longjmp_target, mips64_fill_gregset,
mips64_fill_fpregset, mips_linux_in_dynsym_stub): Update.
* mipsnbdsd-tdep.c (mipsnbsd_get_longjmp_target): Update.
* mips-tdep.c (mips_fetch_instruction, fetch_mips_16,
mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call,
mips_o32_push_dummy_call, mips_o64_push_dummy_call,
mips_single_step_through_delay, mips_skip_pic_trampoline_code,
mips_integer_to_address): Update.
* mn10300-tdep.c (mn10300_analyze_prologue, mn10300_push_dummy_call):
Update.
* monitor.c (monitor_supply_register, monitor_write_memory,
monitor_read_memory_single): Update.
* moxie-tdep.c (moxie_store_return_value, moxie_extract_return_value,
moxie_analyze_prologue): Update.
* mt-tdep.c (mt_return_value, mt_skip_prologue, mt_select_coprocessor,
mt_pseudo_register_read, mt_pseudo_register_write, mt_registers_info,
mt_push_dummy_call): Update.
* objc-lang.c (read_objc_method, read_objc_methlist_nmethods,
read_objc_methlist_method, read_objc_object, read_objc_super,
read_objc_class, find_implementation_from_class): Update.
* ppc64-linux-tdep.c (ppc64_desc_entry_point,
ppc64_linux_convert_from_func_ptr_addr, ppc_linux_sigtramp_cache):
Update.
* ppcobsd-tdep.c (ppcobsd_sigtramp_frame_sniffer,
ppcobsd_sigtramp_frame_cache): Update.
* ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call,
do_ppc_sysv_return_value, ppc64_sysv_abi_push_dummy_call,
ppc64_sysv_abi_return_value): Update.
* ppc-linux-nat.c (ppc_linux_auxv_parse): Update.
* procfs.c (procfs_auxv_parse): Update.
* p-valprint.c (pascal_val_print): Update.
* regcache.c (regcache_raw_read_signed, regcache_raw_read_unsigned,
regcache_raw_write_signed, regcache_raw_write_unsigned,
regcache_cooked_read_signed, regcache_cooked_read_unsigned,
regcache_cooked_write_signed, regcache_cooked_write_unsigned): Update.
* remote-m32r-sdi.c (m32r_fetch_register): Update.
* remote-mips.c (mips_wait, mips_fetch_registers, mips_xfer_memory):
Update.
* rs6000-aix-tdep.c (rs6000_push_dummy_call, rs6000_return_value,
rs6000_convert_from_func_ptr_addr, branch_dest,
rs6000_software_single_step): Update.
* rs6000-tdep.c (rs6000_in_function_epilogue_p,
ppc_displaced_step_fixup, ppc_deal_with_atomic_sequence,
bl_to_blrl_insn_p, rs6000_fetch_instruction, skip_prologue,
rs6000_skip_main_prologue, rs6000_skip_trampoline_code,
rs6000_frame_cache): Update.
* s390-tdep.c (s390_pseudo_register_read, s390_pseudo_register_write,
s390x_pseudo_register_read, s390x_pseudo_register_write, s390_load,
s390_backchain_frame_unwind_cache, s390_sigtramp_frame_unwind_cache,
extend_simple_arg, s390_push_dummy_call, s390_return_value): Update.
* scm-exp.c (scm_lreadr): Update.
* scm-lang.c (scm_get_field, scm_unpack): Update.
* scm-valprint.c (scm_val_print): Update.
* score-tdep.c (score_breakpoint_from_pc, score_push_dummy_call,
score_fetch_inst): Update.
* sh64-tdep.c (look_for_args_moves, sh64_skip_prologue_hard_way,
sh64_analyze_prologue, sh64_push_dummy_call, sh64_extract_return_value,
sh64_pseudo_register_read, sh64_pseudo_register_write,
sh64_frame_prev_register): Update:
* sh-tdep.c (sh_analyze_prologue, sh_push_dummy_call_fpu,
sh_push_dummy_call_nofpu, sh_extract_return_value_nofpu,
sh_store_return_value_nofpu, sh_in_function_epilogue_p): Update.
* solib-darwin.c (darwin_load_image_infos): Update.
* solib-frv.c (fetch_loadmap, lm_base, frv_current_sos, enable_break2,
find_canonical_descriptor_in_load_object): Update.
* solib-irix.c (extract_mips_address, fetch_lm_info, irix_current_sos,
irix_open_symbol_file_object): Update.
* solib-som.c (som_solib_create_inferior_hook, link_map_start,
som_current_sos, som_open_symbol_file_object): Update.
* solib-sunos.c (SOLIB_EXTRACT_ADDRESS, LM_ADDR, LM_NEXT, LM_NAME):
Update.
* solib-svr4.c (read_program_header, scan_dyntag_auxv,
solib_svr4_r_ldsomap): Update.
* sparc64-linux-tdep.c (sparc64_linux_step_trap): Update.
* sparc64obsd-tdep.c (sparc64obsd_supply_uthread,
sparc64obsd_collect_uthread): Update.
* sparc64-tdep.c (sparc64_pseudo_register_read,
sparc64_pseudo_register_write, sparc64_supply_gregset,
sparc64_collect_gregset): Update.
* sparc-linux-tdep.c (sparc32_linux_step_trap): Update.
* sparcobsd-tdep.c (sparc32obsd_supply_uthread,
sparc32obsd_collect_uthread): Update.
* sparc-tdep.c (sparc_fetch_wcookie, sparc32_push_dummy_code,
sparc32_store_arguments, sparc32_return_value, sparc_supply_rwindow,
sparc_collect_rwindow): Update.
* spu-linux-nat.c (parse_spufs_run): Update.
* spu-tdep.c (spu_pseudo_register_read_spu,
spu_pseudo_register_write_spu, spu_pointer_to_address,
spu_analyze_prologue, spu_in_function_epilogue_p,
spu_frame_unwind_cache, spu_push_dummy_call, spu_software_single_step,
spu_get_longjmp_target, spu_get_overlay_table, spu_overlay_update_osect,
info_spu_signal_command, info_spu_mailbox_list, info_spu_dma_cmdlist,
info_spu_dma_command, info_spu_proxydma_command): Update.
* stack.c (print_frame_nameless_args, frame_info): Update.
* symfile.c (read_target_long_array, simple_read_overlay_table,
simple_read_overlay_region_table): Update.
* target.c (debug_print_register): Update.
* tramp-frame.c (tramp_frame_start): Update.
* v850-tdep.c (v850_analyze_prologue, v850_push_dummy_call,
v850_extract_return_value, v850_store_return_value,
* valarith.c (value_binop, value_bit_index): Update.
* valops.c (value_cast): Update.
* valprint.c (val_print_type_code_int, val_print_string,
read_string): Update.
* value.c (unpack_long, unpack_double, unpack_field_as_long,
modify_field, pack_long): Update.
* vax-tdep.c (vax_store_arguments, vax_push_dummy_call,
vax_skip_prologue): Update.
* xstormy16-tdep.c (xstormy16_push_dummy_call,
xstormy16_analyze_prologue, xstormy16_in_function_epilogue_p,
xstormy16_resolve_jmp_table_entry, xstormy16_find_jmp_table_entry,
xstormy16_pointer_to_address, xstormy16_address_to_pointer): Update.
* xtensa-tdep.c (extract_call_winsize, xtensa_pseudo_register_read,
xtensa_pseudo_register_write, xtensa_frame_cache,
xtensa_push_dummy_call, call0_track_op, call0_frame_cache): Update.
* dfp.h (decimal_to_string, decimal_from_string, decimal_from_integral,
decimal_from_floating, decimal_to_doublest, decimal_is_zero): Add
BYTE_ORDER parameter.
(decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT
parameters.
(decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters.
(decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters.
* dfp.c (match_endianness): Add BYTE_ORDER parameter. Use it
instead of current_gdbarch.
(decimal_to_string, decimal_from_integral, decimal_from_floating,
decimal_to_doublest, decimal_is_zero): Add BYTE_ORDER parameter.
Pass it to match_endianness.
(decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT
parameters. Pass them to match_endianness.
(decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters.
Pass them to match_endianness.
(decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters.
Pass them to match_endianness.
* valarith.c (value_args_as_decimal): Add BYTE_ORDER_X and
BYTE_ORDER_Y output parameters.
(value_binop): Update call to value_args_as_decimal.
Update calls to decimal_to_string, decimal_from_string,
decimal_from_integral, decimal_from_floating, decimal_to_doublest,
decimal_is_zero, decimal_binop, decimal_compare and decimal_convert
to pass/receive byte order:
* c-exp.y (parse_number): Update.
* printcmd.c (printf_command): Update.
* valarith.c (value_args_as_decimal, value_binop, value_logical_not,
value_equal, value_less): Update.
* valops.c (value_cast, value_one): Update.
* valprint.c (print_decimal_floating): Update.
* value.c (unpack_long, unpack_double): Update.
* python/python-value.c (valpy_nonzero): Update.
* ada-valprint.c (char_at): Add BYTE_ORDER parameter.
(printstr): Update calls to char_at.
(ada_val_print_array): Likewise.
* valprint.c (read_string): Add BYTE_ORDER parameter.
(val_print_string): Update call to read_string.
* c-lang.c (c_get_string): Likewise.
* charset.h (target_wide_charset): Add BYTE_ORDER parameter.
* charset.c (target_wide_charset): Add BYTE_ORDER parameter.
Use it instead of current_gdbarch.
* printcmd.c (printf_command): Update calls to target_wide_charset.
* c-lang.c (charset_for_string_type): Add BYTE_ORDER parameter.
Pass to target_wide_charset. Use it instead of current_gdbarch.
(classify_type): Add BYTE_ORDER parameter. Pass to
charset_for_string_type. Allow NULL encoding pointer.
(print_wchar): Add BYTE_ORDER parameter.
(c_emit_char): Update calls to classify_type and print_wchar.
(c_printchar, c_printstr): Likewise.
* gdbarch.sh (in_solib_return_trampoline): Convert to type "m".
* gdbarch.c, gdbarch.h: Regenerate.
* arch-utils.h (generic_in_solib_return_trampoline): Add GDBARCH
parameter.
* arch-utils.c (generic_in_solib_return_trampoline): Likewise.
* hppa-hpux-tdep.c (hppa_hpux_in_solib_return_trampoline): Likewise.
* rs6000-tdep.c (rs6000_in_solib_return_trampoline): Likewise.
(rs6000_skip_trampoline_code): Update call.
* alpha-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to
dynamic_sigtramp_offset and pc_in_sigtramp callbacks.
(alpha_read_insn): Add GDBARCH parameter.
* alpha-tdep.c (alpha_lds, alpha_sts): Add GDBARCH parameter.
(alpha_register_to_value): Pass architecture to alpha_sts.
(alpha_extract_return_value): Likewise.
(alpha_value_to_register): Pass architecture to alpha_lds.
(alpha_store_return_value): Likewise.
(alpha_read_insn): Add GDBARCH parameter.
(alpha_skip_prologue): Pass architecture to alpha_read_insn.
(alpha_heuristic_proc_start): Likewise.
(alpha_heuristic_frame_unwind_cache): Likewise.
(alpha_next_pc): Likewise.
(alpha_sigtramp_frame_this_id): Pass architecture to
tdep->dynamic_sigtramp_offset callback.
(alpha_sigtramp_frame_sniffer): Pass architecture to
tdep->pc_in_sigtramp callback.
* alphafbsd-tdep.c (alphafbsd_pc_in_sigtramp): Add GDBARCH parameter.
(alphafbsd_sigtramp_offset): Likewise.
* alpha-linux-tdep.c (alpha_linux_sigtramp_offset_1): Add GDBARCH
parameter. Pass to alpha_read_insn.
(alpha_linux_sigtramp_offset): Add GDBARCH parameter. Pass to
alpha_linux_sigtramp_offset_1.
(alpha_linux_pc_in_sigtramp): Add GDBARCH parameter. Pass to
alpha_linux_sigtramp_offset.
(alpha_linux_sigcontext_addr): Pass architecture to alpha_read_insn
and alpha_linux_sigtramp_offset.
* alphanbsd-tdep.c (alphanbsd_sigtramp_offset): Add GDBARCH parameter.
(alphanbsd_pc_in_sigtramp): Add GDBARCH parameter. Pass to
alphanbsd_sigtramp_offset.
* alphaobsd-tdep.c (alphaobsd_sigtramp_offset): Add GDBARCH parameter.
(alphaobsd_pc_in_sigtramp): Add GDBARCH parameter. Pass to
alpha_read_insn.
(alphaobsd_sigcontext_addr): Pass architecture to
alphaobsd_sigtramp_offset.
* alpha-osf1-tdep.c (alpha_osf1_pc_in_sigtramp): Add GDBARCH
parameter.
* amd64-tdep.c (amd64_analyze_prologue): Add GDBARCH parameter.
(amd64_skip_prologue): Pass architecture to amd64_analyze_prologue.
(amd64_frame_cache): Likewise.
* arm-tdep.c (SWAP_SHORT, SWAP_INT): Remove.
(thumb_analyze_prologue, arm_skip_prologue, arm_scan_prologue,
thumb_get_next_pc, arm_get_next_pc): Do not use SWAP_ macros.
* arm-wince-tdep.c: Include "frame.h".
* avr-tdep.c (EXTRACT_INSN): Remove.
(avr_scan_prologue): Add GDBARCH argument, inline EXTRACT_INSN.
(avr_skip_prologue): Pass architecture to avr_scan_prologue.
(avr_frame_unwind_cache): Likewise.
* cris-tdep.c (struct instruction_environment): Add BYTE_ORDER member.
(find_step_target): Initialize it.
(get_data_from_address): Add BYTE_ORDER parameter.
(bdap_prefix): Pass byte order to get_data_from_address.
(handle_prefix_assign_mode_for_aritm_op): Likewise.
(three_operand_add_sub_cmp_and_or_op): Likewise.
(handle_inc_and_index_mode_for_aritm_op): Likewise.
* frv-linux-tdep.c (frv_linux_pc_in_sigtramp): Add GDBARCH parameter.
(frv_linux_sigcontext_reg_addr): Pass architecture to
frv_linux_pc_in_sigtramp.
(frv_linux_sigtramp_frame_sniffer): Likewise.
* h8300-tdep.c (h8300_is_argument_spill): Add GDBARCH parameter.
(h8300_analyze_prologue): Add GDBARCH parameter. Pass to
h8300_is_argument_spill.
(h8300_frame_cache, h8300_skip_prologue): Pass architecture
to h8300_analyze_prologue.
* hppa-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to
in_solib_call_trampoline callback.
(hppa_in_solib_call_trampoline): Add GDBARCH parameter.
* hppa-tdep.c (hppa64_convert_code_addr_to_fptr): Add GDBARCH
parameter.
(hppa64_push_dummy_call): Pass architecture to
hppa64_convert_code_addr_to_fptr.
(hppa_match_insns): Add GDBARCH parameter.
(hppa_match_insns_relaxed): Add GDBARCH parameter. Pass to
hppa_match_insns.
(hppa_skip_trampoline_code): Pass architecture to hppa_match_insns.
(hppa_in_solib_call_trampoline): Add GDBARCH parameter. Pass to
hppa_match_insns_relaxed.
(hppa_stub_unwind_sniffer): Pass architecture to
tdep->in_solib_call_trampoline callback.
* hppa-hpux-tdep.c (hppa_hpux_search_pattern): Add GDBARCH parameter.
(hppa32_hpux_search_dummy_call_sequence): Pass architecture to
hppa_hpux_search_pattern.
* hppa-linux-tdep.c (insns_match_pattern): Add GDBARCH parameter.
(hppa_linux_sigtramp_find_sigcontext): Add GDBARCH parameter.
Pass to insns_match_pattern.
(hppa_linux_sigtramp_frame_unwind_cache): Pass architecture to
hppa_linux_sigtramp_find_sigcontext.
(hppa_linux_sigtramp_frame_sniffer): Likewise.
(hppa32_hpux_in_solib_call_trampoline): Add GDBARCH parameter.
(hppa64_hpux_in_solib_call_trampoline): Likewise.
* i386-tdep.c (i386_follow_jump): Add GDBARCH parameter.
(i386_analyze_frame_setup): Add GDBARCH parameter.
(i386_analyze_prologue): Add GDBARCH parameter. Pass to
i386_follow_jump and i386_analyze_frame_setup.
(i386_skip_prologue): Pass architecture to i386_analyze_prologue
and i386_follow_jump.
(i386_frame_cache): Pass architecture to i386_analyze_prologue.
(i386_pe_skip_trampoline_code): Add FRAME parameter.
* i386-tdep.h (i386_pe_skip_trampoline_code): Add FRAME parameter.
* i386-cygwin-tdep.c (i386_cygwin_skip_trampoline_code): Pass
frame to i386_pe_skip_trampoline_code.
* ia64-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter
to sigcontext_register_address callback.
* ia64-tdep.c (ia64_find_global_pointer): Add GDBARCH parameter.
(ia64_find_unwind_table): Pass architecture to
ia64_find_global_pointer.
(find_extant_func_descr): Add GDBARCH parameter.
(find_func_descr): Pass architecture to find_extant_func_descr
and ia64_find_global_pointer.
(ia64_sigtramp_frame_init_saved_regs): Pass architecture to
tdep->sigcontext_register_address callback.
* ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Add
GDBARCH parameter.
* iq2000-tdep.c (iq2000_scan_prologue): Add GDBARCH parameter.
(iq2000_frame_cache): Pass architecture to iq2000_scan_prologue.
* lm32-tdep.c (lm32_analyze_prologue): Add GDBARCH parameter.
(lm32_skip_prologue, lm32_frame_cache): Pass architecture to
lm32_analyze_prologue.
* m32r-tdep.c (decode_prologue): Add GDBARCH parameter.
(m32r_skip_prologue): Pass architecture to decode_prologue.
* m68hc11-tdep.c (m68hc11_analyze_instruction): Add GDBARCH parameter.
(m68hc11_scan_prologue): Pass architecture to
m68hc11_analyze_instruction.
* m68k-tdep.c (m68k_analyze_frame_setup): Add GDBARCH parameter.
(m68k_analyze_prologue): Pass architecture to
m68k_analyze_frame_setup.
* m88k-tdep.c (m88k_fetch_instruction): Add BYTE_ORDER parameter.
(m88k_analyze_prologue): Add GDBARCH parameter. Pass byte order
to m88k_fetch_instruction.
(m88k_skip_prologue): Pass architecture to m88k_analyze_prologue.
(m88k_frame_cache): Likewise.
* mep-tdep.c (mep_get_insn): Add GDBARCH parameter.
(mep_analyze_prologue): Pass architecture to mep_get_insn.
* mips-tdep.c (mips_fetch_instruction): Add GDBARCH parameter.
(mips32_next_pc): Pass architecture to mips_fetch_instruction.
(deal_with_atomic_sequence): Likewise.
(unpack_mips16): Add GDBARCH parameter, pass to mips_fetch_instruction.
(mips16_scan_prologue): Likewise.
(mips32_scan_prologue): Likewise.
(mips16_in_function_epilogue_p): Likewise.
(mips32_in_function_epilogue_p): Likewise.
(mips_about_to_return): Likewise.
(mips_insn16_frame_cache): Pass architecture to mips16_scan_prologue.
(mips_insn32_frame_cache): Pass architecture to mips32_scan_prologue.
(mips_skip_prologue): Pass architecture to mips16_scan_prologue
and mips32_scan_prologue.
(mips_in_function_epilogue_p): Pass architecture to
mips16_in_function_epilogue_p and
mips32_in_function_epilogue_p.
(heuristic_proc_start): Pass architecture to mips_fetch_instruction
and mips_about_to_return.
(mips_skip_mips16_trampoline_code): Pass architecture to
mips_fetch_instruction.
(fetch_mips_16): Add GDBARCH parameter.
(mips16_next_pc): Pass architecture to fetch_mips_16.
(extended_mips16_next_pc): Pass architecture to unpack_mips16 and
fetch_mips_16.
* objc-lang.c (read_objc_method, read_objc_methlist_nmethods,
read_objc_methlist_method, read_objc_object, read_objc_super,
read_objc_class): Add GDBARCH parameter.
(find_implementation_from_class): Add GDBARCH parameter, pass
to read_objc_class, read_objc_methlist_nmethods, and
read_objc_methlist_method.
(find_implementation): Add GDBARCH parameter, pass to
read_objc_object and find_implementation_from_class.
(resolve_msgsend, resolve_msgsend_stret): Pass architecture
to find_implementation.
(resolve_msgsend_super, resolve_msgsend_super_stret): Pass
architecture to read_objc_super and find_implementation_from_class.
* ppc64-linux-tdep.c (ppc64_desc_entry_point): Add GDBARCH parameter.
(ppc64_standard_linkage1_target, ppc64_standard_linkage2_target,
ppc64_standard_linkage3_target): Pass architecture to
ppc64_desc_entry_point.
* rs6000-tdep.c (bl_to_blrl_insn_p): Add BYTE_ORDER parameter.
(skip_prologue): Pass byte order to bl_to_blrl_insn_p.
(rs6000_fetch_instruction): Add GDBARCH parameter.
(rs6000_skip_stack_check): Add GDBARCH parameter, pass to
rs6000_fetch_instruction.
(skip_prologue): Pass architecture to rs6000_fetch_instruction.
* remote-mips.c (mips_store_word): Return old_contents as host
integer value instead of target bytes.
* s390-tdep.c (struct s390_prologue_data): Add BYTE_ORDER member.
(s390_analyze_prologue): Initialize it.
(extend_simple_arg): Add GDBARCH parameter.
(s390_push_dummy_call): Pass architecture to extend_simple_arg.
* scm-lang.c (scm_get_field): Add BYTE_ORDER parameter.
* scm-lang.h (scm_get_field): Add BYTE_ORDER parameter.
(SCM_CAR, SCM_CDR): Pass SCM_BYTE_ORDER to scm_get_field.
* scm-valprint.c (scm_scmval_print): Likewise.
(scm_scmlist_print, scm_ipruk, scm_scmval_print): Define
SCM_BYTE_ORDER.
* sh64-tdep.c (look_for_args_moves): Add GDBARCH parameter.
(sh64_skip_prologue_hard_way): Add GDBARCH parameter, pass to
look_for_args_moves.
(sh64_skip_prologue): Pass architecture to
sh64_skip_prologue_hard_way.
* sh-tdep.c (sh_analyze_prologue): Add GDBARCH parameter.
(sh_skip_prologue): Pass architecture to sh_analyze_prologue.
(sh_frame_cache): Likewise.
* solib-irix.c (extract_mips_address): Add GDBARCH parameter.
(fetch_lm_info, irix_current_sos, irix_open_symbol_file_object):
Pass architecture to extract_mips_address.
* sparc-tdep.h (sparc_fetch_wcookie): Add GDBARCH parameter.
* sparc-tdep.c (sparc_fetch_wcookie): Add GDBARCH parameter.
(sparc_supply_rwindow, sparc_collect_rwindow): Pass architecture
to sparc_fetch_wcookie.
(sparc32_frame_prev_register): Likewise.
* sparc64-tdep.c (sparc64_frame_prev_register): Likewise.
* sparc32nbsd-tdep.c (sparc32nbsd_sigcontext_saved_regs): Likewise.
* sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_saved_regs): Likewise.
* spu-tdep.c (spu_analyze_prologue): Add GDBARCH parameter.
(spu_skip_prologue): Pass architecture to spu_analyze_prologue.
(spu_virtual_frame_pointer): Likewise.
(spu_frame_unwind_cache): Likewise.
(info_spu_mailbox_list): Add BYTE_ORER parameter.
(info_spu_mailbox_command): Pass byte order to info_spu_mailbox_list.
(info_spu_dma_cmdlist): Add BYTE_ORER parameter.
(info_spu_dma_command, info_spu_proxydma_command): Pass byte order
to info_spu_dma_cmdlist.
* symfile.c (read_target_long_array): Add GDBARCH parameter.
(simple_read_overlay_table, simple_read_overlay_region_table,
simple_overlay_update_1): Pass architecture to read_target_long_array.
* v850-tdep.c (v850_analyze_prologue): Add GDBARCH parameter.
(v850_frame_cache): Pass architecture to v850_analyze_prologue.
* xstormy16-tdep.c (xstormy16_analyze_prologue): Add GDBARCH
parameter.
(xstormy16_skip_prologue, xstormy16_frame_cache): Pass architecture
to xstormy16_analyze_prologue.
(xstormy16_resolve_jmp_table_entry): Add GDBARCH parameter.
(xstormy16_find_jmp_table_entry): Likewise.
(xstormy16_skip_trampoline_code): Pass architecture to
xstormy16_resolve_jmp_table_entry.
(xstormy16_pointer_to_address): Likewise.
(xstormy16_address_to_pointer): Pass architecture to
xstormy16_find_jmp_table_entry.
* xtensa-tdep.c (call0_track_op): Add GDBARCH parameter.
(call0_analyze_prologue): Add GDBARCH parameter, pass to
call0_track_op.
(call0_frame_cache): Pass architecture to call0_analyze_prologue.
(xtensa_skip_prologue): Likewise.
2009-07-02 17:25:59 +00:00
Ulrich Weigand
d452c4bcef
* python/python-internal.h (struct language_defn): Declare.
...
(python_gdbarch, python_language): Likewise.
(ensure_python_env): Add prototype.
(make_cleanup_py_restore_gil): Remove prototype.
* python/python.c: Include "arch-utils.h", "value.h" and "language.h".
(python_gdbarch, python_language): New global variables.
(struct python_env): New data type.
(ensure_python_env, restore_python_env): New functions.
(eval_python_from_control_command): Call ensure_python_env to
install current architecture and language.
(python_command, gdbpy_new_objfile): Likewise.
* python/python-cmd.c: Include "arch-utils.h" and "language.h".
(cmdpy_destroyer, cmdpy_function, cmdpy_completer): Call
ensure_python_env.
* python/python-type.c (clean_up_objfile_types): Likewise.
* python/python-objfile.c: Include "language.h".
(clean_up_objfile): Call ensure_python_env.
* python/python-prettyprint.c (apply_val_pretty_printer): Likewise.
(apply_varobj_pretty_printer): Do not call PyGILState_Ensure.
* varobj.c (varobj_ensure_python_env): New helper function.
(varobj_get_display_hint, update_dynamic_varobj_children,
install_default_visualizer, varobj_set_visualizer, free_variable,
value_get_print_value): Call it.
(value_get_print_value): Add varobj argument instead of pretty
printer argument. Update all callers.
* python/python-utils.c (py_gil_restore, make_cleanup_py_restore_gil):
Remove.
* value.h (internal_function_fn): Add GDBARCH and LANGUAGE argument.
(call_internal_function): Likewise.
* value.c (call_internal_function): Likewise. Pass to handler.
* eval.c (evaluate_subexp_standard): Update call.
* python/python-function.c: Include "language.h".
(fnpy_call): Add GDBARCH and LANGAUAGE arguments and call
make_cleanup_python_env.
* python/python-value.c (builtin_type_pyint, builtin_type_pyfloat,
builtin_type_pylong, builtin_type_pybool, builtin_type_pychar,
valpy_str): Use python_gdbarch and python_language instead of
current_gdbarch and current_language.
* python/python-type.c (typy_lookup_typename): Likewise.
2009-07-02 17:04:23 +00:00
Ulrich Weigand
e17c207e88
* arch-utils.c (selected_byte_order): Return target_byte_order_user.
...
(show_endian): Use target_byte_order_user if specified; otherwise
use get_current_arch () instead of current_gdbarch.
(show_architecture): Use set_architecture_string if specified;
otherwise use get_current_arch () instead of current_gdbarch.
(get_current_arch): New function.
* arch-utils.h (get_current_arch): Add prototype.
* osabi.c (show_osabi): Use get_current_arch () instead of
current_gdbarch.
* findcmd.c: Include "arch-utils.h".
(parse_find_args): Add BIG_P argument. Use it instead of byte order
of current_gdbarch.
(find_command): Use get_current_arch () instead of current_gdbarch.
Pass byte order to parse_find_args.
* maint.c: Include "arch-utils.h".
(maintenance_print_architecture): Use get_current_arch () instead
of current_gdbarch.
* reggroups.c: Include "arch-utils.h".
(maintenance_print_reggroups): Use get_current_arch () instead
of current_gdbarch.
* symfile.c: Include "arch-utils.h".
(overlay_load_command): Use get_current_arch () instead of
current_gdbarch.
* value.c: Include "arch-utils.h".
(show_convenience): Use get_current_arch () instead of
current_gdbarch.
* tui/tui-regs.c: Include "arch-utils.h".
(tui_reg_next_command): Use get_current_arch () instead of
current_gdbarch.
* mi/mi-main.c: Include "arch-utils.h".
(mi_cmd_data_read_memory): Use get_current_arch () instead of
current_gdbarch.
* parse.c: Include "arch-utils.h".
(parse_exp_in_context): Use get_current_arch () instead of
current_gdbarch.
2009-07-02 17:02:35 +00:00
Ulrich Weigand
5081068481
* gdbtypes.c (make_pointer_type, make_reference_type,
...
smash_to_memberptr_type, lookup_array_range_type, check_stub_method):
Use type architecture instead of current_gdbarch.
* gdbtypes.h (address_space_name_to_int, address_space_int_to_name):
Add GDBARCH paramter.
* gdbtypes.c (address_space_name_to_int, address_space_int_to_name):
Add GDBARCH parameter. Use it instead of current_gdbarch.
* c-typeprint.c (c_type_print_modifier): Update call.
* parse.c (push_type_address_space): Likewise.
* findvar.c (extract_typed_address, store_typed_address): Use type
architecture instead of current_gdbarch.
* value.c (value_as_address, unpack_field_as_long): Use type architecture
instead of current_gdbarch.
* doublest.c (floatformat_from_length): Add GDBARCH argument. Use it
instead of current_gdbarch.
(floatformat_from_type): Pass type architecture.
* infcall.c (find_function_addr): Use type architecture instead
of current_gdbarch.
* valarith.c (value_bitstring_subscript, value_x_binop, value_neg,
value_bit_index): Use type architecture instead of current_gdbarch.
* valops.c (value_cast, value_slice): Likewise.
* value.h (modify_field): Add TYPE argument.
* value.c (modify_field): Add TYPE argument. Use type architecture
instead of current_gdbarch.
(set_internalvar_component): Likewise.
* eval.c (evaluate_struct_tuple): Update call.
* valops.c (value_assign): Likewise.
* ada-lang.c (modify_general_field): Likewise. Add TYPE argument.
(make_array_descriptor): Update calls.
(move_bits): Add BITS_BIG_ENDIAN_P argument. Use it instead of
current_gdbarch.
(ada_value_assign, value_assign_to_component): Update calls.
(decode_packed_array, ada_value_primitive_packed_val, ada_value_assign,
value_assign_to_component): Use type arch instead of current_gdbarch.
* printcmd.c (float_type_from_length): Remove GDBARCH argument,
use type architecture instead.
(print_scalar_formatted, printf_command): Update calls. Use type
architecture instead of current_gdbarch.
* valprint.c (val_print_type_code_int): Use type architecture
instead of current_gdbarch.
* varobj.c (value_get_print_value): Likewise.
* python/python-prettyprint.c (print_string_repr): Add GDBARCH
argument. Use it instead of current_gdbarch.
(apply_val_pretty_printer): Update call.
* ada-valprint.c (ada_val_print_1): Use type architecture instead
of current_gdbarch.
* c-valprint.c (print_function_pointer_address): Add GDBARCH argument.
Use it instead of current_gdbarch.
(c_val_print): Update calls passing type architecture.
* f-valprint.c (f_val_print): Use type architecture instead of
current_gdbarch.
* jv-valprint (java_value_print): Likewise.
* m2-valprint.c (print_function_pointer_address): Add GDBARCH argument.
Use it instead of current_gdbarch.
(print_unpacked_pointer): Update calls passing type architecture.
* scm-valprint.c (scm_scmval_print): Use type architecture instead of
current_gdbarch.
* gnu-v3-abi.c (get_class_arch): Remove.
(gnuv3_rtti_type): Use get_type_arch instead of get_class_arch. Remove
special-case check for Java classes.
(gnuv3_virtual_fn_field, gnuv3_baseclass_offset, gnuv3_print_method_ptr,
gnuv3_method_ptr_size, gnuv3_make_method_ptr, gnuv3_method_ptr_to_value):
Use get_type_arch instead of get_class_arch.
2009-07-02 12:57:14 +00:00
Ulrich Weigand
e3506a9f27
* gdbtypes.c (lookup_array_range_type): Add prototype.
...
(lookup_string_range_type): Likewise.
* gdbtypes.c (lookup_array_range_type): New function.
(lookup_string_range_type): Likewise.
* ax-gdb.c (gen_repeat): Use lookup_array_range_type.
* parse.c (follow_types): Likewise.
* jv-lang.c (java_array_type): Likewise.
* gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
* mt-tdep.c (mt_register_type): Likewise.
* sh-tdep.c (sh_sh4_build_float_register_type): Likewise.
* sh64-tdep.c (sh64_build_float_register_type): Likewise.
* value.c (allocate_repeat_value): Likewise.
* valops.c (value_array, value_cstring): Likewise.
* valops.c (value_string): Use lookup_string_range_type.
2009-07-02 12:18:46 +00:00
Ulrich Weigand
78267919d6
* gdbtypes.h (struct builtin_type): Add internal_fn member.
...
* gdbtypes.c (gdbtypes_post_init): Initialize it.
* value.c (internal_fn_type): Remove.
(_initialize_values): Do not initialize it.
* value.c (struct internalvar): Add enum internalvar_kind type and
kind member. Restructure union internalvar_data type. Remove type,
canonical, and make_value members.
(init_if_undefined_command): Update for data structure changes.
(create_internalvar): Likewise.
(create_internalvar_type_lazy): Likewise.
(get_internalvar_integer): Likewise.
(get_internalvar_function): Likewise.
(set_internalvar_component): Likewise.
(set_internalvar): Likewise.
(set_internalvar_integer): Likewise.
(set_internalvar_function): Likewise.
(clear_internalvar): Likewise.
(add_internal_function): Likewise.
(preserve_one_internalvar): New function.
(preserve_values): Call it.
* value.h (value_of_internalvar): Add GDBARCH parameter.
(internalvar_make_value): Likewise.
* value.c (value_of_internalvar): Add GDBARCH parameter. Pass it to
make_value callback. Use it to generate per-architecture result value
types for internal variables with no pre-defined type. Update for data
structure changes.
(show_convenience): Pass architecture to value_of_internalvar.
* eval.c (evaluate_subexp_standard): Likewise.
* infrun.c (siginfo_make_value): Add GDBARCH parameter. Use it
instead of current frame architecture. Return per-architecture type.
* value.h (set_internalvar_string): Add prototype.
* value.c (set_internalvar_string): New function.
* tracepoint.c (set_traceframe_context): Use it.
2009-07-02 12:11:19 +00:00
Ulrich Weigand
3b7538c031
* gdbtypes.c (create_string_type): Receive character type as argument.
...
* gdbtypes.h (create_string_type): Add character type argument.
* dwarf2read.c (read_tag_string_type): Pass character type to
create_string_type.
* value.h (value_string): Add character type argument.
* valops.c (value_string): Add character type argument. Pass it to
create_string_type. Do not allocate space in inferior.
* valarith.c (value_concat): Pass character type to value_string.
* value.h (value_typed_string): Rename to ...
(value_cstring): ... this.
* valops.c (value_typed_string): Rename to ...
(value_cstring): ... this.
* c-lang.c (evaluate_subexp_c): Update.
* python/python-value.c (builtin_type_pychar): New define.
(convert_value_from_python): Call value_cstring instead
of value_from_string.
* value.c (value_from_string): Remove.
* value.h (value_from_string): Remove.
* eval.c (evaluate_subexp_standard): Pass character type to
value_string. Pass expression architecture to value_nsstring
and lookup_child_selector.
* objc-lang.h (lookup_objc_class): Add GDBARCH parameter.
(lookup_child_selector): Likewise.
(value_nsstring): Likewise.
* objc-lang.c (lookup_objc_class): Add GDBARCH parameter.
Pass character type to value_string..
(lookup_child_selector): Likewise.
(value_nsstring): Add GDBARCH parameter, use it instead of
objfile architecture. Pass architecture to lookup_objc_class
and lookup_child_selector. Pass character type to value_string.
(end_msglist): Pass architecture to lookup_objc_class.
* objc-exp.y: Pass architecture to lookup_objc_class.
2009-06-17 18:47:35 +00:00
Ulrich Weigand
d80b854b33
* dummy-frame.c (deprecated_pc_in_call_dummy): Add GDBARCH parameter,
...
use it instead of current_gdbarch.
* frame.h (deprecated_pc_in_call_dummy): Add GDBARCH parameter.
* arm-tdep.c (arm_skip_prologue): Pass architecture to
deprecated_pc_in_call_dummy.
* symtab.c (skip_prologue_using_sal): Add GDBARCH parameter.
Use it instead of current_gdbarch.
* symtab.h (skip_prologue_using_sal): Add GDBARCH parameter.
* breakpoint.c (expand_line_sal_maybe): Pass architecture to
skip_prologue_using_sal.
* arm-tdep.c (skip_prologue_using_sal): Likewise.
* lm32-tdep.c (lm32_skip_prologue): Likewise.
* m32-tdep.c (m32c_skip_prologue): Likewise.
* mips-tdep.c (mips_skip_prologue): Likewise.
* moxie-tdep.c (moxie_skip_prologue): Likewise.
* mt-tdep.c (mt_frame_unwind_cache): Likewise.
* rs6000-tdep.c (rs6000_skip_prologue): Likewise.
* frv-tdep.c (frv_analyze_prologue): Add GDBARCH parameter, pass
it to skip_prologue_using_sal. Update call sites ...
(frv_skip_prologue, frv_frame_unwind_cache): ... here.
* mn10300-tdep.c (struct mn10300_prologue): Add GDBARCH member.
(check_for_saved): Use it instead of current_gdbarch.
(mn10300_analyze_prologue): Set it.
* value.c (using_struct_return): Add GDBARCH parameter. Use it
instead of current_gdbarch.
* value.h (using_struct_return): Add GDBARCH parameter.
* eval.c (evaluate_subexp_standard): Pass architecture to
using_struct_return.
* infcall.c (call_function_by_hand): Likewise.
* stack.c (return_command): Likewise.
* sparc-tdep.c (sparc32_push_dummy_code): Likewise.
* symtab.c (in_prologue): Add GDBARCH parameter. Use it instead of
current_gdbarch.
* symtab.h (in_prologue): Add GDBARCH parameter.
* infrun.c (handle_inferior_event): Pass architecture to in_prologue.
* eval.c (evaluate_subexp_standard): Use expression architecture
instead of current_gdbarch.
* c-lang.c (evaluate_subexp_c): Use expression architecture and
language instead of current_gdbarch and current_language.
* printcmd.c (do_one_display): Use expression architecture instead
of current_gdbarch.
* infcmd.c (print_return_value): Use architecture of stop_regcache
instead of current_gdbarch.
(print_vector_info, print_float_info): Remove GDBARCH argument,
use frame architecture instead.
(vector_info, float_info): Update calls.
* objc-lang.c (objc_skip_trampoline): Use frame architecture
instead of current_gdbarch.
* parse.c (write_dollar_variable): Use parse architecture instead
of current_gdbarch.
* source.c (line_info): Use objfile architecture instead of
current_gdbarch.
* symtab.c (find_function_start_sal): Use gdbarch instead of
current_gdbarch.
(print_msymbol_info): Use objfile architecture instead of
current_gdbarch.
* valops.c (value_assign): Use frame architecture instead of
current_gdbarch.
2009-06-17 18:43:24 +00:00
Ulrich Weigand
4fa6249465
* value.h (struct internalvar): Remove.
...
(get_internalvar_integer): Add prototype.
(set_internalvar_integer): Add prototype.
(clear_internalvar): Add prototype.
* value.c (struct internalvar): Move here. Add type member. Remove
endian member. Add union_internalvar member instead of value member.
(init_if_undefined_command): Use intvar->type.
(create_internalvar): Do not initialize value/endian, but type.
(create_internalvar_type_lazy): Call create_internalvar.
(value_of_internalvar): Handle host-side internalvar contents.
(set_internalvar_component): Likewise.
(set_internalvar): Likewise.
(get_internalvar_integer): New function.
(clear_internalvar): Likewise.
(set_internalvar_integer): Likewise.
(preserve_values): Handle host-side internalvar contents.
* breakpoint.c (set_breakpoint_count, set_tracepoint_count): Call
set_internalvar_integer instead of set_internalvar.
* findcmd.c (find_command): Likewise.
* infrun.c (handle_inferior_event): Likewise.
* source.c (forward_search_command, reverse_search_command): Likewise.
* tracepoint.c (set_traceframe_num, set_tracepoint_num,
set_traceframe_context): Likewise.
* printcmd.c (x_command): Call clear_internalvar instead of
set_internalvar.
* tracepoint.c (set_traceframe_context): Likewise.
* breakpoint.c (get_number_trailer): Call get_internalvar_integer
instead of value_of_internalvar.
* linespec.c (decode_dollar): Likewise.
* expprint.c (dump_subexp_body_standard): Use internalvar_name
instead of accessing internalvar private elements.
* valops.c (value_assign): Copy from original source instead of
accessing internalvar private elements.
2009-06-03 18:16:44 +00:00
Tom Tromey
42ae523077
2009-05-27 Tom Tromey <tromey@redhat.com>
...
Paul Pluzhnikov <ppluzhnikov@google.com>
* mi/mi-main.c (mi_cmd_data_evaluate_expression): Use
value_address.
* cli/cli-dump.c (dump_value_to_file): Use value_address.
* valprint.c (common_val_print): Likewise.
* v850-tdep.c (v850_push_dummy_call): Use value_address.
* tracepoint.c (encode_actions): Use value_address.
* printcmd.c (print_formatted): Use value_address.
(x_command): Likewise.
* p-valprint.c (pascal_object_print_static_field): Use
value_address.
* mn10300-tdep.c (mn10300_push_dummy_call): Use value_address.
* mips-tdep.c (mips_eabi_push_dummy_call): Use value_address.
* m32r-tdep.c (m32r_push_dummy_call): Use value_address.
* jv-valprint.c (java_value_print): Use value_address.
* infcall.c (find_function_addr): Use value_address.
* gnu-v3-abi.c (gnuv3_rtti_type): Use value_address.
* gnu-v2-abi.c (gnuv2_value_rtti_type): Use value_address.
* frv-tdep.c (frv_push_dummy_call): Use value_address.
* frame.c (frame_register_unwind): Use value_address.
(frame_unwind_register_value): Likewise.
* darwin-nat-info.c (info_mach_region_command): Use
value_address.
* cp-valprint.c (cp_print_static_field): Use value_address.
* c-valprint.c (c_value_print): Use value_address.
* breakpoint.c (update_watchpoint): Use value_address.
(can_use_hardware_watchpoint): Likewise.
* ada-valprint.c (ada_val_print_1): Use value_address.
(ada_value_print): Likewise.
* ada-tasks.c (read_fat_string_value): Use value_address.
* jv-lang.c (java_link_class_type): Use set_value_address.
(java_link_class_type): Likewise.
(get_java_utf8_name): Use value_address.
(type_from_class): Likewise.
(java_link_class_type): Likewise.
* findvar.c (value_of_register): Use set_value_address.
(read_var_value): Likewise.
(read_var_value): Likewise.
* eval.c (evaluate_subexp_standard): Use set_value_address.
(evaluate_subexp_standard): Use value_address.
* dwarf2loc.c (dwarf2_evaluate_loc_desc): Use set_value_address.
* ada-lang.c (coerce_unspec_val_to_type): Use set_value_address.
(ada_value_primitive_packed_val): Likewise.
(ensure_lval): Likewise.
(thin_data_pntr): Use value_address.
(desc_bounds): Likewise.
(ada_value_primitive_packed_val): Likewise.
(value_assign_to_component): Likewise.
(ensure_lval): Likewise.
(make_array_descriptor): Likewise.
(ada_to_fixed_value): Likewise.
(unwrap_value): Likewise.
* value.c (deprecated_value_address_hack): Remove.
(value_address): New function.
(value_raw_address): Likewise.
(set_value_address): Likewise.
(value_fn_field): Use set_value_address.
(value_from_contents_and_address): Likewise.
(value_fn_field): Likewise.
(allocate_value_lazy): Don't use VALUE_ADDRESS.
(value_as_address): Use value_address.
(value_static_field): Likewise.
* valops.c (search_struct_field): Use set_value_address.
(value_at): Likewise.
(value_at_lazy): Likewise.
(value_repeat): Likewise.
(value_cast_structs): Use value_address.
(value_cast): Likewise.
(value_fetch_lazy): Likewise.
(value_assign): Likewise.
(value_repeat): Likewise.
(address_of_variable): Likewise.
(value_coerce_array): Likewise.
(value_coerce_function): Likewise.
(value_addr): Likewise.
(search_struct_field): Likewise.
(search_struct_method): Likewise.
(find_method_list): Likewise.
(value_struct_elt_for_reference): Likewise.
(value_full_object): Likewise.
* jv-valprint.c (java_value_print): Use set_value_address.
* value.h (deprecated_value_address_hack): Remove.
(VALUE_ADDRESS): Remove.
(value_address): Declare.
(value_raw_address): Declare.
(set_value_address): Declare.
2009-05-28 00:53:52 +00:00
Thiago Jung Bauermann
bc3b79fd1a
gdb/
...
2009-03-05 Tom Tromey <tromey@redhat.com>
Add support for convenience functions in Python.
* Makefile.in (SUBDIR_PYTHON_OBS): Add python-function.o.
(SUBDIR_PYTHON_SRCS): Add python-function.c.
(python-function.o): New target.
* eval.c: Include "python/python.h" and <ctype.h>.
(evaluate_subexp_standard): Handle values of type
TYPE_CODE_INTERNAL_FUNCTION.
* gdbtypes.h (type_code): Add TYPE_CODE_INTERNAL_FUNCTION.
* parse.c (write_exp_string): Remove duplicate word in comment.
* python/python-function.c: New file.
* python/python-internal.h (gdbpy_initialize_functions): Add
prototype.
* python/python.c (_initialize_python): Call
gdbpy_initialize_functions.
* valprint.c (value_check_printable): Handle values of type
TYPE_CODE_INTERNAL_FUNCTION.
* value.c: Include "cli/cli-decode.h".
(internal_function): New struct.
(functionlist, internal_fn_type): New static variables.
(lookup_only_internalvar,
lookup_internalvar): Add const qualifier to name argument.
(create_internalvar): Likewise. Initialize new field.
(set_internal_var): Fix typo in comment. Don't allow assignment
to canonical variable.
(value_create_internal_function, value_internal_function_name,
call_internal_function, function_command, function_destroyer,
add_internal_function): New functions.
(_initialize_values): Create `function' placeholder command.
Initialize internal_fn_type.
* value.h (lookup_only_internalvar, create_internalvar,
lookup_internalvar): Add const qualifier to name argument.
(internal_function_fn, add_internal_function, call_internal_function,
value_internal_function_name): Add prototypes.
(struct internalvar) <canonical>: New field.
gdb/doc/
2008-03-05 Tom Tromey <tromey@redhat.com>
* gdb.texinfo (Convenience Vars): Document convenience functions.
(Functions In Python): New node.
(Python API): Update.
gdb/testsuite/
2009-03-05 Thiago Jung Bauermann <bauerman@br.ibm.com>
* gdb.python/python-function.exp: New file.
2009-03-21 03:03:56 +00:00
Pedro Alves
4aa995e123
2009-02-06 Pedro Alves <pedro@codesourcery.com>
...
gdb/
* target.h (enum target_object): Add new TARGET_OBJECT_SIGNAL_INFO.
* infrun.c (siginfo_value_read, siginfo_value_write): New.
(siginfo_value_funcs): New.
(siginfo_make_value): New.
(_initialize_infrun): Create the $_siginfo convenience variable.
* gdbtypes.h (append_composite_type_field_aligned): Declare.
* gdbtypes.c (append_composite_type_field): Rename to...
(append_composite_type_field_aligned): ... this. Add ALIGNMENT
argument. Handle it.
(append_composite_type_field): Rewrite on top of
append_composite_type_field_aligned.
* value.h (internalvar_make_value): New typedef.
(struct internalvar) <make_value>: New field.
(create_internalvar_type_lazy): Declare.
* value.c (create_internalvar): Clear make_value.
(create_internalvar_type_lazy): New.
(value_of_internalvar): If make_value is set use it.
(preserve_values): Skip internal variables that don't have a
value.
* gdbarch.sh (get_siginfo_type): New.
* gdbarch.h, gdbarch.c: Regenerate.
* linux-tdep.h, linux-tdep.c: New.
* amd64-linux-tdep.c: Include "linux-tdep.h".
(amd64_linux_init_abi): Register linux_get_siginfo_type and
linux_get_siginfo_mapper.
* i386-linux-tdep.c: Include "linux-tdep.h".
(i386_linux_init_abi): Register linux_get_siginfo_type and
linux_get_siginfo_mapper.
* arm-linux-tdep.c: Include "linux-tdep.h".
(i386_linux_init_abi): Register linux_get_siginfo_type and
linux_get_siginfo_mapper.
* linux-nat.c (linux_xfer_siginfo): New.
(linux_nat_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
* remote.c (PACKET_qXfer_siginfo_read)
(PACKET_qXfer_siginfo_write): New.
(feature remote_protocol_features): Add "qXfer:siginfo:read" and
"qXfer:siginfo:write" features.
(remote_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
(_initialize_remote): Add "set/show remote read-siginfo-object"
and "set/show remote write-siginfo-object" commands.
* Makefile.in (ALL_TARGET_OBS): Add linux-tdep.o.
(HFILES_NO_SRCDIR): Add linux-tdep.h.
(ALLDEPFILES): Add linux-tdep.c.
* configure.tgt (arm*-*-linux* | arm*-*-uclinux*)
(i[34567]86-*-linux*, x86_64-*-linux*): Add linux-tdep.o to
gdb_target_obs.
2009-02-06 Pedro Alves <pedro@codesourcery.com>
gdb/gdbserver/
* server.c (handle_query): Report qXfer:siginfo:read and
qXfer:siginfo:write as supported and handle them.
* target.h (struct target_ops) <qxfer_siginfo>: New field.
* linux-low.c (linux_xfer_siginfo): New.
(linux_target_ops): Set it.
2009-02-06 Pedro Alves <pedro@codesourcery.com>
gdb/doc/
* gdb.texinfo (Signals): Document $_siginfo.
(Convenience Variables): Mention $_siginfo.
(Remote Configuration): Document qXfer:siginfo:read,
qXfer:siginfo:write packets, and the read-siginfo-object,
write-siginfo-object commands.
2009-02-06 Pedro Alves <pedro@codesourcery.com>
gdb/testsuite/
* gdb.base/siginfo-obj.c, gdb.base/siginfo-obj.exp: New.
2009-02-06 22:59:01 +00:00
Pedro Alves
5f5233d48e
gdb/
...
2009-02-06 Jim Blandy <jimb@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
Vladimir Prus <vladimir@codesourcery.com>
Pedro Alves <pedro@codesourcery.com>
* defs.h (enum lval_type): New value: lval_computed.
* value.h (struct lval_funcs): New type.
(allocate_computed_value, value_computed_funcs)
(value_computed_closure): New declarations.
* value.c (struct value): Add a structure to the location union
for computed lvalues, containing 'funcs' and 'closure' members.
(allocate_computed_value, value_computed_funcs)
(value_computed_closure): New functions.
(value_free): For computed lvalues, call the closure's
'free_closure' function before freeing the value itself.
(value_copy): If we're copying an lval_computed value, call the
closure's 'copy_closure' function.
(set_value_component_location): If the original value is a
computed lvalue, then call the closure's 'copy_closure' function.
(value_of_internalvar): If an internal variable's value is a
computed lvalue, make retrieving its value produce an equivalent
computed lvalue.
* valops.c (value_fetch_lazy): Unlazy computed lvalues by calling
their read function.
(value_assign): Assign to computed lvalues by calling their write
function.
gdb/doc/
2009-02-06 Pedro Alves <pedro@codesourcery.com>
* gdbint.texinfo (Values): New chapter.
2009-02-06 22:50:52 +00:00
Jerome Guitton
33d502b41a
* value.c (value_from_contents_and_address): Always return
...
a lval_memory value, even if address is null.
2009-02-04 15:49:30 +00:00
Pedro Alves
74bcbdf3ce
2009-01-13 Jim Blandy <jimb@codesourcery.com>
...
Abstract out common code for copying value locations.
* value.h (set_value_component_location): New declaration.
* value.c (set_value_component_location): New function.
(value_primitive_field): Use it.
* valarith.c (value_subscript, value_subscripted_rvalue): Same.
* valops.c (search_struct_field, value_slice): Same.
* ada-lang.c (coerce_unspec_val_to_type)
(ada_value_primitive_packed_val): Same.
2009-01-13 10:34:31 +00:00
Tom Tromey
170ce85276
* value.c (set_internalvar): Use value_free, not xfree.
2009-01-07 00:45:54 +00:00
Joel Brobecker
0fb0cc7590
Updated copyright notices for most files.
2009-01-03 05:58:08 +00:00
Jerome Guitton
3e3d7139ee
* value.h (allocate_value_lazy): New function declaration.
...
(value_free): Remove macro, make it a function.
* value.c (value): Move actual content outside of the memory space
of the struct; add a pointer to this actual content.
(allocate_value_lazy, allocate_value_contents): New function.
(allocate_value): Reimplement using these two new functions.
(value_contents_raw, value_contents_all_raw): If no memory
has been allocated yet for the actual content, allocate it.
(value_contents_all): Resync with struct value's changes.
(value_free): New function.
(value_copy, value_primitive_field): Use new function
allocate_value_lazy to allocate lazy values.
(value_change_enclosing_type): Resync with struct value's changes.
As the value is not reallocated, remove the special handling for
the value chain (now obsolete).
* valops.c (value_at_lazy): Use new function allocate_value_lazy.
(value_fetch_lazy): Allocate value content. Use allocate_value_lazy
to allocate lazy values.
(value_slice): Use allocate_value_lazy to allocate lazy values.
2008-11-26 16:27:28 +00:00
Tom Tromey
8acb6b92f9
* ada-lang.c (value_from_contents_and_address): Move...
...
* value.c: ... here.
* ada-lang.h (value_from_contents_and_address): Move
declaration...
* value.h: ... here.
2008-11-24 23:21:16 +00:00
Tom Tromey
f3134b8886
gdb
...
* value.c (coerce_array): Use check_typedef.
gdb/testsuite
* gdb.base/pointers.exp: Add test.
* gdb.base/pointers.c (k, S): New typedefs.
(instance): New global.
2008-10-30 21:44:15 +00:00
Tom Tromey
79a45b7d67
gdb
...
* varobj.c (value_get_print_value): Include valprint.h.
(value_get_print_value): Use get_formatted_print_options.
* value.h (struct value_print_options): Declare.
(value_print, val_print, common_val_print, val_print_string):
Update.
* value.c: Include valprint.h.
(show_values): Use get_user_print_options.
(show_convenience): Likewise.
* valprint.h (prettyprint_arrays, prettyprint_structs): Don't
declare.
(struct value_print_options): New type.
(vtblprint, unionprint, addressprint, objectprint, print_max,
inspect_it, repeat_count_threshold, output_format,
stop_print_at_null): Don't declare.
(user_print_options, get_user_print_options,
get_raw_print_options, get_formatted_print_options): Declare.
(print_array_indexes_p): Don't declare.
(maybe_print_array_index, val_print_array_elements): Update.
* valprint.c (print_max): Remove.
(user_print_options): New global.
(get_user_print_options, get_raw_print_options,
get_formatted_print_options): New functions.
(print_array_indexes, repeat_count_threshold, stop_print_at_null,
prettyprint_structs, prettyprint_arrays, unionprint,
addressprint): Remove.
(val_print): Remove format, deref_ref, pretty arguments; add
options. Update.
(common_val_print): Likewise.
(print_array_indexes_p): Remove.
(maybe_print_array_index): Remove format, pretty arguments; add
options. Update.
(val_print_array_elements): Remove format, deref_ref, pretty
arguments; add options. Update.
(val_print_string): Add options argument. Update.
(_initialize_valprint): Use user_print_options.
(output_format): Remove.
(set_output_radix_1): Use user_print_options.
* typeprint.c: Include valprint.h.
(objectprint): Don't declare.
(whatis_exp): Use get_user_print_options.
* tui/tui-regs.c: Include valprint.h.
(tui_register_format): Use get_formatted_print_options.
* tracepoint.c: Include valprint.h.
(addressprint): Don't declare.
(trace_mention): Use get_user_print_options.
(tracepoints_info): Likewise.
* stack.c (print_frame_args): Use get_raw_print_options.
(print_frame_info): Use get_user_print_options.
(print_frame): Likewise.
* sh64-tdep.c: Include valprint.h
(sh64_do_register): Use get_formatted_print_options.
* scm-valprint.c (scm_inferior_print): Remove format, deref_ref,
pretty arguments; add options.
(scm_scmlist_print): Likewise. Update.
(scm_scmval_print): Likewise.
(scm_val_print): Likewise.
(scm_value_print): Remove format, pretty arguments; add options.
Update.
* scm-lang.h (scm_value_print, scm_val_print, scm_scmval_print):
Update.
* scm-lang.c (scm_printstr): Add options argument.
* python/python-value.c: Include valprint.h.
(valpy_str): Use get_user_print_options.
* printcmd.c: Include valprint.h.
(addressprint): Don't declare.
(inspect_it): Remove.
(print_formatted): Remove format option; add options. Update.
(print_scalar_formatted): Likewise.
(print_address_demangle): Use get_user_print_options.
(do_examine): Use get_formatted_print_options.
(print_command_1): Likewise.
(output_command): Use get_formatted_print_options.
(do_one_display): Likewise.
(print_variable_value): Use get_user_print_options.
* p-valprint.c (pascal_val_print): Remove format, deref_ref,
pretty arguments; add options. Update.
(pascal_value_print): Remove format, pretty arguments; add
options. Update.
(vtblprint, objectprint): Don't declare.
(pascal_static_field_print): Remove.
(pascal_object_print_value_fields): Remove format, pretty
arguments; add options. Update.
(pascal_object_print_static_field): Likewise.
(_initialize_pascal_valprint): Use user_print_options. Update.
* p-lang.h (pascal_val_print, pascal_value_print,
pascal_printstr, pascal_object_print_value_fields): Update.
(vtblprint, static_field_print): Don't declare.
* p-lang.c (pascal_printstr): Add options argument. Update.
* objc-lang.c (objc_printstr): Add options argument. Update.
* mt-tdep.c: Include valprint.h.
(mt_registers_info): Use get_raw_print_options.
* mips-tdep.c: Include valprint.h.
(mips_print_fp_register): Use get_formatted_print_options.
(mips_print_register): Likewise.
* mi/mi-main.c: Include valprint.h.
(get_register): Use get_user_print_options.
(mi_cmd_data_evaluate_expression): Likewise.
(mi_cmd_data_read_memory): Use get_formatted_print_options.
* mi/mi-cmd-stack.c: Include valprint.h.
(list_args_or_locals): Use get_raw_print_options.
* m2-valprint.c (print_function_pointer_address): Add addressprint
argument.
(m2_print_long_set): Remove format, pretty arguments.
(m2_print_unbounded_array): Remove format, deref_ref, pretty
arguments; add options. Update.
(print_unpacked_pointer): Remove format argument; add options.
Now static. Update.
(print_variable_at_address): Remove format, deref_ref, pretty
arguments; add options. Update.
(m2_print_array_contents): Likewise.
(m2_val_print): Likewise.
* m2-lang.h (m2_val_print): Update.
* m2-lang.c (m2_printstr): Add options argument. Update.
* language.h (struct value_print_options): Declare.
(struct language_defn) <la_printstr>: Add options argument.
<la_val_print>: Remove format, deref_ref, pretty argument; add
options.
<la_value_print>: Remove format, pretty arguments; add options.
<la_print_array_index>: Likewise.
(LA_VAL_PRINT, LA_VALUE_PRINT, LA_PRINT_STRING,
LA_PRINT_ARRAY_INDEX): Update.
(default_print_array_index): Update.
* language.c (default_print_array_index): Remove format, pretty
arguments; add options. Update.
(unk_lang_printstr): Add options argument.
(unk_lang_val_print): Remove format, deref_ref, pretty arguments;
add options.
(unk_lang_value_print): Remove format, pretty arguments; add
options.
* jv-valprint.c (java_value_print): Remove format, pretty
arguments; add options. Update.
(java_print_value_fields): Likewise.
(java_val_print): Remove format, deref_ref, pretty arguments; add
options. Update.
* jv-lang.h (java_val_print, java_value_print): Declare.
* infcmd.c: Include valprint.h.
(print_return_value): Use get_raw_print_options.
(default_print_registers_info): Use get_user_print_options,
get_formatted_print_options.
(registers_info): Use get_formatted_print_options.
* gdbtypes.h (struct value_print_options): Declare.
(print_scalar_formatted): Update.
* f-valprint.c (f77_print_array_1): Remove format, deref_ref,
pretty arguments; add options. Update.
(f77_print_array): Likewise.
(f_val_print): Likewise.
* f-lang.h (f_val_print): Update.
* f-lang.c (f_printstr): Add options argument. Update.
(c_value_print): Update declaration.
* expprint.c: Include valprint.h.
(print_subexp_standard): Use get_raw_print_options,
get_user_print_options.
* eval.c: Include valprint.h.
(objectprint): Don't declare.
(evaluate_subexp_standard): Use get_user_print_options.
* cp-valprint.c (vtblprint, objectprint, static_field_print):
Remove.
(cp_print_value_fields): Remove format, pretty arguments; add
options. Update.
(cp_print_value): Likewise.
(cp_print_static_field): Likewise.
(_initialize_cp_valprint): Use user_print_options. Update.
* c-valprint.c (print_function_pointer_address): Add addressprint
argument.
(c_val_print): Remove format, deref_ref, pretty arguments; add
options. Update.
(c_value_print): Add options argument. Update.
* c-lang.h (c_val_print, c_value_print, c_printstr): Update.
(vtblprint, static_field_print): Don't declare.
(cp_print_value_fields): Update.
* c-lang.c (c_printstr): Add options argument. Update.
* breakpoint.c: Include valprint.h.
(addressprint): Don't declare.
(watchpoint_value_print): Use get_user_print_options.
(print_one_breakpoint_location): Likewise.
(breakpoint_1, print_it_catch_fork, print_it_catch_vfork, mention,
print_exception_catchpoint): Likewise.
* auxv.c (fprint_target_auxv): Don't declare addressprint. Use
get_user_print_options.
* ada-valprint.c (struct ada_val_print_args): Remove format,
deref_ref, and pretty; add options.
(print_optional_low_bound): Add options argument.
(val_print_packed_array_elements): Remove format and pretty
arguments; add options. Update.
(printstr): Add options argument. Update.
(ada_printstr): Likewise.
(ada_val_print): Remove format, deref_ref, pretty arguments; add
options argument. Update.
(ada_val_print_stub): Update.
(ada_val_print_array): Remove format, deref_ref, pretty arguments;
add options. Update.
(ada_val_print_1): Likewise.
(print_variant_part): Likewise.
(ada_value_print): Remove format, pretty arguments; add options.
Update.
(print_record): Likewise.
(print_field_values): Likewise.
* ada-lang.h (ada_val_print, ada_value_print, ada_printstr):
Update.
* ada-lang.c (ada_print_array_index): Add options argument; remove
format and pretty arguments.
(print_one_exception): Use get_user_print_options.
gdb/testsuite
* gdb.base/exprs.exp (test_expr): Add enum formatting tests.
2008-10-28 17:19:58 +00:00
Thiago Jung Bauermann
a08702d647
2008-10-16 Thiago Jung Bauermann <bauerman@br.ibm.com>
...
Tom Tromey <tromey@redhat.com>
gdb/
* Makefile.in (SUBDIR_PYTHON_OBS): Add python-value.o.
(SUBDIR_PYTHON_SRCS): Add python-value.c.
(python-value.o): New target.
* configure.ac (CONFIG_OBS): Add python-value.o.
(CONFIG_SRCS): Add python/python-value.c
* configure: Regenerate.
* python-internal.h (value_object_type): Add external declaration.
(gdbpy_get_value_from_history, value_to_value_object,
convert_value_from_python, gdbpy_initialize_values): Add function
prototype.
* python/python-value.c: New file.
* python/python.c (GdbMethods): Add gdbpy_get_value_from_history.
(_initialize_python): Call gdbpy_initialize_values.
* python/python.h (values_in_python): Add external declaration.
* value.c (value_prepend_to_list, value_remove_from_list): New
functions.
(preserve_values): Iterate over values_in_python list as well.
* value.h (value_prepend_to_list, value_remove_from_list): Add
function prototypes.
gdb/doc/
* gdb.texinfo. (Values From Inferior): New subsubsection.
gdb/testsuite/
* gdb.python/python-value.c: New file.
* gdb.python/python-value.exp: New file.
2008-10-16 03:54:00 +00:00
Jan Kratochvil
d6a843b594
Convert static_kind into loc_kind enum.
...
* gdbtypes.h (enum field_loc_kind): New.
(union field_location): New field dwarf_block.
(struct field): Rename static_kind as loc_kind.
(FIELD_STATIC_KIND): Rename to ...
(FIELD_LOC_KIND): ... here.
(TYPE_FIELD_STATIC_KIND): Rename to ...
(TYPE_FIELD_LOC_KIND): ... here and use there now new FIELD_LOC_KIND.
(TYPE_FIELD_STATIC_HAS_ADDR): Remove.
(TYPE_FIELD_STATIC): Remove.
(TYPE_FIELD_BITPOS): Reformat.
(SET_FIELD_BITPOS): New.
(FIELD_PHYSADDR): Rename to ...
(FIELD_STATIC_PHYSADDR): ... here.
(TYPE_FIELD_STATIC_PHYSADDR): Follow the FIELD_PHYSADDR rename.
(SET_FIELD_PHYSADDR): Use new FIELD_LOC_KIND.
(FIELD_PHYSNAME): Rename to ...
(FIELD_STATIC_PHYSNAME): ... here.
(TYPE_FIELD_STATIC_PHYSNAME): Follow the FIELD_PHYSNAME rename.
(SET_FIELD_PHYSNAME): Use new FIELD_LOC_KIND.
(FIELD_DWARF_BLOCK, TYPE_FIELD_DWARF_BLOCK, SET_FIELD_DWARF_BLOCK): New.
(field_is_static): New declaration.
* gdbtypes.c (field_is_static): New function.
(copy_type_recursive): Update throughout.
* amd64-tdep.c, c-typeprint.c, coffread.c, cp-valprint.c, dwarf2read.c,
eval.c, jv-typeprint.c, jv-valprint.c, mdebugread.c, p-typeprint.c,
p-valprint.c, valops.c, value.c, varobj.c: Update throughout.
2008-10-08 12:49:13 +00:00
Ulrich Weigand
6d84d3d833
* ada-lang.c (ada_coerce_to_simple_array_type): Use builtin_type_int32
...
instead of builtin_type_int as default unspecified integral type.
(ada_index_type, ada_array_bound_from_type, ada_variant_discrim_type,
assign_component, to_fixed_range_type): Likewise.
* ada-typeprint.c (print_range, print_range_bound,
print_range_type_named): Likewise.
* ada-valprint.c (print_optional_low_bound, ada_val_print_1): Likewise.
* eval.c (evaluate_subexp_standard): Likewise.
* gnu-v2-abi.c (gnuv2_virtual_fn_field): Likewise.
* gnu-v3-abi.c (gnuv3_get_virtual_fn, gnuv3_baseclass_offset,
build_gdb_vtable_type): Likewise.
* jv-lang.c (java_array_type): Likewise.
* m2-typeprint.c (m2_print_bounds, m2_is_long_set_of_type): Likewise.
* m2-valprint.c (m2_print_long_set): Likewise.
* parse.c (follow_types): Likewise.
* p-typeprint.c (pascal_type_print_base): Likewise.
* valops.c (value_one, value_array, value_string,
value_bitstring): Likewise.
* value.c (allocate_repeat_value, value_from_string): Likewise.
* varobj.c (c_describe_child): Likewise.
* mt-tdep.c (mt_register_type): Likewise.
* sh-tdep.c (sh_sh4_build_float_register_type): Likewise.
* sh64-tdep.c (sh64_build_float_register_type): Likewise.
2008-09-11 14:22:33 +00:00
Ulrich Weigand
0ab7ba45fa
* value.h (coerce_enum, coerce_number): Remove prototypes.
...
* value.c (coerce_enum, coerce_number): Remove.
* valarith.c (value_x_binop): Do not call coerce_enum.
(value_x_unop): Likewise.
(value_logical_not): Call coerce_array instead of coerce_number.
2008-09-11 14:16:14 +00:00
Daniel Jacobowitz
a4e2ee12f0
* value.c (value_primitive_field): Fetch lazy register values.
2008-06-11 19:59:09 +00:00
Ulrich Weigand
2570f2b7e1
* symtab.h (lookup_symbol_in_language): Remove SYMTAB parameter.
...
(lookup_symbol): Likewise.
* symtab.c (lookup_symbol_in_language): Remove SYMTAB parameter.
(lookup_symbol): Likewise.
(search_symbols): Update.
* linespec.c (find_methods, collect_methods): Update.
(add_matching_methods, add_constructors): Update.
(decode_compound, decode_dollar, decode_variable): Update.
(lookup_prefix_sym): Update.
(symbol_found): Remove SYM_SYMTAB parameter.
Use SYMBOL_SYMTAB (sym) instead.
* gdbtypes.c (lookup_typename): Update.
(lookup_struct, lookup_union, lookup_enum): Update.
(lookup_template_type): Update.
(check_typedef): Update.
* language.c (lang_bool_type): Update.
* mdebugread.c (parse_procedure): Update.
* mi/mi-cmd-stack.c (list_args_or_locals): Update.
* parse.c (write_dollar_variable): Update.
* printcmd.c (address_info): Update.
* source.c (select_source_symtab): Update.
* stack.c (print_frame_args, print_frame_arg_vars): Update.
* valops.c (find_function_in_inferior): Update.
(value_struct_elt_for_reference): Update.
* value.c (value_static_field, value_fn_field): Update.
* alpha-mdebug-tdep.c (find_proc_desc): Update.
* arm-tdep.c (arm_skip_prologue): Update.
* mt-tdep.c (mt_skip_prologue): Update.
* xstormy16-tdep.c (xstormy16_skip_prologue): Update.
* ada-lang.h (struct ada_symbol_info): Remove SYMTAB member.
* ada-lang.c (ada_add_block_symbols): Remove SYMTAB parameter.
(add_defn_to_vec): Likewise.
(ada_add_block_symbols): Likewise.
(lookup_cached_symbol, cache_symbol): Likewise.
(standard_lookup): Update.
(ada_lookup_symbol_list): Update.
* c-valprint.c (c_val_print): Update.
* cp-support.c (cp_lookup_rtti_type): Update.
* jv-lang.c (java_lookup_class, get_java_object_type): Update.
* objc-lang.c (lookup_struct_typedef, find_imps): Update.
* p-valprint.c (pascal_val_print): Update.
* scm-lang.c (scm_lookup_name): Update.
* c-exp.y: Update.
* f-exp.y: Update.
* jv-exp.y: Update.
* m2-exp.y: Update.
* objc-exp.y: Update.
* p-exp.y: Update.
2008-05-19 15:50:10 +00:00
Thiago Jung Bauermann
938f5214c6
2008-05-03 Luis Machado <luisgpm@br.ibm.com>
...
Thiago Jung Bauermann <bauerman@br.ibm.com>
* cli/cli-decode.c (lookup_cmd_1): Fix indentation.
* doublest.c (convert_typed_floating): Fix typo in comment.
* dwarf2-frame.c (dwarf2_frame_cache): Likewise.
* frame-unwind.h (frame_sniffer_ftype): Likewise.
* frame.c (frame_unwind_address_in_block): Likewise.
* ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): Likewise.
* symtab.h (struct symbol): Likewise.
* tramp-frame.h (struct trad_frame_cache): Likewise.
* value.c (allocate_repeat_value): Likewise.
2008-05-03 23:24:17 +00:00
Thiago Jung Bauermann
f132ba9d37
* breakpoint.c (create_exception_catchpoint): Remove prototype
...
for already deleted function.
* breakpoint.h (ep_is_exception_catchpoint): Likewise.
* frame.h (show_stack_frame): Remove prototype.
* stack.c (show_stack_frame): Remove empty, unused function.
* source.c (symtab_to_fullname, print_source_lines): Small fix
in comment.
* value.c (show_values): Update comments to mention "show values"
command instead of "info history".
2008-05-03 06:13:21 +00:00
Ulrich Weigand
bccdca4a5f
* linespec.c: Include "target.h".
...
(minsym_found): Handle minimal symbols pointing to function
descriptors. Use find_function_start_pc.
* minsyms.c (msymbol_objfile): New function.
* parse.c (write_exp_msymbol): Handle minimal symbols pointing
to function descriptors.
* symtab.c (fixup_section): Only use minimal symbol at the same
address to determine section of a symbol.
(find_function_start_pc): New function.
(find_function_start_sal): Use it.
* symtab.h (msymbol_objfile): Add prototype.
(find_function_start_pc): Likewise.
* value.c: Include "objfiles.h".
(value_fn_field): Handle minimal symbols pointing to function
descriptors.
* Makefile.in (linespec.o): Update dependencies.
(value.o): Likewise.
2008-05-03 00:37:35 +00:00
Daniel Jacobowitz
9214ee5f5f
* ada-lang.c (ada_value_primitive_packed_val): Only check
...
value_lazy for memory lvals.
* findvar.c (value_of_register_lazy): New function.
(locate_var_value): Only check value_lazy for memory lvals.
* valarith.c (value_subscripted_rvalue): Likewise.
* valops.c (value_fetch_lazy): Handle both memory and register
lvals.
(search_struct_field, value_slice): Only check value_lazy for memory
lvals.
* value.c (struct value): Update comment for lazy.
(value_primitive_field): Only check value_lazy for memory lvals.
* value.h (value_lazy): Update comment.
(value_of_register_lazy): Declare.
2008-04-30 21:13:49 +00:00
Corinna Vinschen
c055b1010f
doc/ChangeLog:
...
--------------
* gdb.texinfo (Set SH Calling convention): New @item.
(Show SH Calling convention): Ditto.
ChangeLog:
----------
* NEWS: Add information on calling convention and new SH CLI options.
* sh-tdep.c (sh_cc_gcc): New static string.
(sh_cc_renesas): Ditto.
(sh_cc_enum): New static string array.
(sh_active_calling_convention): New static string pointer denoting
active user chosen ABI.
(sh_is_renesas_calling_convention): New function to return function
specific ABI, or user choice if necessary.
(sh_use_struct_convention): Rename first argument and turn around its
meaning. Check for renesas ABI and return accordingly.
(sh_use_struct_convention_nofpu): New function.
(sh_next_flt_argreg): Get function type as third parameter. Check
for renesas ABI and choose floating registers accordingly.
(sh_push_dummy_call_fpu): Check for ABI and choose argument slot and
struct return slot accordingly.
(sh_push_dummy_call_nofpu): Ditto.
(sh_return_value_nofpu): Call sh_use_struct_convention_nofpu from here.
Evaluate ABI and give to sh_use_struct_convention_nofpu.
(sh_return_value_fpu): Evaluate ABI and give to
sh_use_struct_convention.
(show_sh_command): New function.
(set_sh_command): Ditto.
(_initialize_sh_tdep): Initialize `set/show sh calling-convention
CLI command.
* gdbarch.sh (return_value): Add func_type argument.
* gdbarch.c: Regenerate.
* gdbarch.h: Ditto.
* eval.c (evaluate_subexp_standard): Rename local variable value_type to
val_type so as not to collide with value_type function. Call
using_struct_return with additional function type argument.
* infcall.c (call_function_by_hand): Call using_struct_return and
gdbarch_return_value with additional function type argument.
* infcmd.c (print_return_value): Take addition func_type argument.
Call gdbarch_return_value with additional function type argument.
(finish_command_continuation): Call print_return_value with additional
function type argument.
(finish_command): Ditto.
* sparc-tdep.c (sparc32_push_dummy_code): Call using_struct_return with
additional function type argument.
* stack.c (return_command): Call using_struct_return and
gdbarch_return_value with additional function type argument.
* value.c (using_struct_return): Take additional function type argument.
* value.h (using_struct_return): Accommodate declaration.
* alpha-tdep.c (alpha_return_value): Add func_type argument.
* amd64-tdep.c (amd64_return_value): Ditto.
* arm-tdep.c (arm_return_value): Ditto.
* avr-tdep.c (avr_return_value): Ditto.
* cris-tdep.c (cris_return_value): Ditto.
* frv-tdep.c (frv_return_value): Ditto.
* h8300-tdep.c (h8300_return_value): Ditto.
(h8300h_return_value): Ditto.
* hppa-tdep.c (hppa32_return_value): Ditto.
(hppa64_return_value): Ditto.
* i386-tdep.c (i386_return_value): Ditto.
* ia64-tdep.c (ia64_return_value): Ditto.
* iq2000-tdep.c (iq2000_return_value): Ditto.
* m32c-tdep.c (m32c_return_value): Ditto.
* m32r-tdep.c (m32r_return_value): Ditto.
* m68hc11-tdep.c (m68hc11_return_value): Ditto.
* m68k-tdep.c (m68k_return_value): Ditto.
(m68k_svr4_return_value): Ditto.
* m88k-tdep.c (m88k_return_value): Ditto.
* mep-tdep.c (mep_return_value): Ditto.
* mips-tdep.c (mips_eabi_return_value): Ditto.
(mips_n32n64_return_value): Ditto.
(mips_o32_return_value): Ditto.
(mips_o64_return_value): Ditto.
* mn10300-tdep.c (mn10300_return_value): Ditto.
* mt-tdep.c (mt_return_value): Ditto.
* ppc-linux-tdep.c (ppc_linux_return_value): Ditto.
* ppc-sysv-tdep.c (ppc_sysv_abi_return_value): Ditto.
(ppc_sysv_abi_broken_return_value): Ditto.
(ppc64_sysv_abi_return_value): Ditto.
* ppc-tdep.h (ppc_sysv_abi_return_value): Ditto.
(ppc_sysv_abi_broken_return_value): Ditto.
(ppc64_sysv_abi_return_value): Ditto.
* ppcnbsd-tdep.c (ppcnbsd_return_value): Ditto.
* rs6000-tdep.c (rs6000_return_value): Ditto.
* s390-tdep.c (s390_return_value): Ditto.
* score-tdep.c (score_return_value): Ditto.
* sh-tdep.c (sh_return_value_nofpu): Ditto.
(sh_return_value_fpu): Ditto.
* sh64-tdep.c (sh64_return_value): Ditto.
* sparc-tdep.c (sparc32_return_value): Ditto.
* sparc64-tdep.c (sparc64_return_value): Ditto.
* spu-tdep.c (spu_return_value): Ditto.
* v850-tdep.c (v850_return_value): Ditto.
* vax-tdep.c (vax_return_value): Ditto.
* xstormy16-tdep.c (xstormy16_return_value): Ditto.
* xtensa-tdep.c (xtensa_return_value): Ditto.
* gdbtypes.h (struct type): Add calling_convention member.
* dwarf2read.c (read_subroutine_type): Add calling convention read
from DW_AT_calling_convention attribute to function type.
2008-04-22 11:03:42 +00:00
Markus Deuling
32c9a79572
* gdbarch.sh (function_list): Add new property bits_big_endian to
...
gdbarch structure.
* gdbarch.{c,h}: Regenerate.
* value.c (struct value): Replace BITS_BIG_ENDIAN by
gdbarch_bits_big_endian (comment).
(unpack_field_as_long, modify_field): Likewise.
* value.h: Likewise (comment).
* valops.c (value_slice): Likewise.
* valarith.c (value_subscript, value_bit_index): Likewise.
* gdbtypes.h (field): Likewise (comment).
* eval.c (evaluate_subexp_standard): Likewise.
* dwarf2read.c (dwarf2_add_field): Likewise.
* ada-lang.c (decode_packed_array, ada_value_primitive_packed_val)
(move_bits, ada_value_assign, value_assign_to_component): Likewise.
* defs.h (BITS_BIG_ENDIAN): Remove.
* gdbint.texinfo (Target Conditionals): Replace the description of
BITS_BIG_ENDIAN with a description of gdbarch_bits_big_endian.
2008-01-18 17:07:40 +00:00
Mark Kettenis
ba759613c3
* dfp.c, dfp.h: Rename decimal_to_double to decimal_to_doublest.
...
* value.c: All callers changed.
2008-01-16 16:16:44 +00:00
Thiago Jung Bauermann
4ef30785ea
* Makefile.in (dfp.o): Depend on expression.h, gdbtypes.h and value.h.
...
(valarith.o): Depend on dfp.h.
(valops.o): Likewise.
* dfp.c: Include expression.h, gdbtypes.h, value.h and dfp.h.
(set_decnumber_context): New function.
(decimal_check_errors): Likewise.
(decimal_from_number): Likewise.
(decimal_to_number): Likewise.
(decimal_from_string): Use set_decnumber_context and
decimal_check_errors.
(decimal_from_integral): New function.
(decimal_from_floating): Likewise.
(decimal_to_double): Likewise.
(promote_decimal): Likewise.
(decimal_binop): Likewise.
(decimal_is_zero): Likewise.
(decimal_compare): Likewise.
(decimal_convert): Likewise.
* dfp.h (decimal_from_integral): New prototype.
(decimal_from_floating): Likewise.
(decimal_to_double): Likewise.
(decimal_binop): Likewise.
(decimal_is_zero): Likewise.
(decimal_compare): Likewise.
(decimal_convert): Likewise.
* eval.c (evaluate_subexp_standard): Remove expect_type argument from
call to value_from_decfloat.
* valarith.c: Include dfp.h.
(value_args_as_decimal): New function.
(value_binop): Add if block to handle TYPE_CODE_DECFLOAT values.
(value_logical_not): Likewise.
(value_equal): Likewise.
(value_less): Likewise.
(value_pos): Likewise.
(value_neg): Formatting fix.
* valops.c: Include dfp.h.
(value_cast): Add if block to handle TYPE_CODE_DECFLOAT values.
* value.c (unpack_long): Add case to handle TYPE_CODE_DECFLOAT.
(unpack_double): Add if block to handle TYPE_CODE_DECFLOAT.
(value_from_decfloat): Remove expect_type argument.
* value.h (value_from_decfloat): Update prototype.
2008-01-07 22:33:57 +00:00
Daniel Jacobowitz
9b254dd1ce
Updated copyright notices for most files.
2008-01-01 22:53:26 +00:00
Thiago Jung Bauermann
a4ae0ca1db
* dfp.c (decimal_from_string): Remove superfluous newline from
...
error string.
(decimal_to_string): Likewise.
* printcmd.c (printf_command): Change string buffer to use
MAX_DECIMAL_STRING constant.
* value.c (value_from_decfloat): Likewise.
2007-11-27 20:13:12 +00:00
Thiago Jung Bauermann
27bc4d809e
2007-10-25 Wu Zhou <woodzltc@cn.ibm.com>
...
Thiago Jung Bauermann <bauerman@br.ibm.com>
* c-exp.y (YYSTYPE): Add typed_val_decfloat for decimal
floating point in YYSTYPE union.
(DECFLOAT) Add token and expression element handling code.
(parse_number): Parse DFP constants, which end with suffix 'df',
'dd' or 'dl'. Return DECFLOAT.
* eval.c (evaluate_subexp_standard): Call value_from_decfloat to
handle OP_DECFLOAT.
* expression.h (enum exp_opcode): Add an opcode (OP_DECFLOAT)
for DFP constants.
(union exp_element): Add decfloatconst to represent DFP
elements, which is 16 bytes by default.
* parse.c (write_exp_elt_decfloatcst): New function to write a
decimal float const into the expression.
(operator_length_standard): Set operator length for OP_DECFLOAT
to 4.
* parser-defs.h (write_exp_elt_decfloatcst): Prototype.
* valarith.c (value_neg): Add code to handle the negation
operation of DFP values.
* value.c (value_from_decfloat): New function to get the value
from a decimal floating point.
* value.h (value_from_decfloat): Prototype.
2007-10-25 18:01:58 +00:00
Ulrich Weigand
c187492465
* gdbarch.sh (deprecated_use_struct_convention): Remove.
...
(extract_return_value, store_return_value): Remove.
(return_value): Remove default implementation.
* gdbarch.c, gdbarch.h: Regenerate.
* stack.c (return_command): Remove compatibility hack.
* arch-utils.c (legacy_return_value): Remove.
* arch-utils.h (legacy_return_value): Likewise.
* arch-utils.c (always_use_struct_convention): Remove.
* arch-utils.h (always_use_struct_convention): Likewise.
* value.c (generic_use_struct_convention): Remove.
* defs.h (generic_use_struct_convention): Likewise.
doc/ChangeLog:
* gdbint.texi (Target Conditionals): Remove documentation
of and references to DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS,
gdbarch_extract_return_value, and gdbarch_store_return_value.
2007-10-13 00:06:54 +00:00
Ulrich Weigand
82585c7265
* block.h (struct block): Remove "gcc_compile_flag" member.
...
(BLOCK_GCC_COMPILED): Remove.
* block.c (allocate_block): Do not clear BLOCK_GCC_COMPILED.
* buildsym.c (finish_block): Do not set it.
* symmisc.c (dump_symtab_1): Do not dump it.
* value.h (using_struct_return): Remove "gcc_p" argument.
* value.c (using_struct_return): Likewise.
* eval.c (evaluate_subexp_standard): Adapt callers.
* infcall.c (call_function_by_hand): Likewise.
* stack.c (return_command): Likewise.
* sparc-tdep.c (sparc32_push_dummy_code): Likewise.
* gdbarch.sh (push_dummy_code): Remove "using_gcc" parameter.
* gdbarch.c, gdbarch.h: Regenerate.
* cris-tdep.c (cris_push_dummy_code): Adapt prototype.
* hppa-hpux-tdep.c (hppa_hpux_push_dummy_code): Likewise.
* sparc-tdep.c (sparc32_push_dummy_code): Likewise.
* infcall.c (generic_push_dummy_code, push_dummy_code): Likewise.
(push_dummy_code, call_function_by_hand): Adapt callers.
2007-10-12 15:34:45 +00:00
Mike Frysinger
c4a3d09a71
2007-09-30 Mike Frysinger <vapier@gentoo.org>
...
* value.h (lookup_only_internalvar): New prototype.
(create_internalvar): Likewise.
* value.c (lookup_only_internalvar): New function.
(create_internalvar): Likewise.
(lookup_internalvar): Use new lookup_only_internalvar and
create_internalvar functions.
* parse.c (write_dollar_variable): Look up $ symbols in internal
table first rather than last.
2007-10-01 01:39:52 +00:00
Joel Brobecker
a9762ec78a
Switch the license of all .c files to GPLv3.
...
Switch the license of all .h files to GPLv3.
Switch the license of all .cc files to GPLv3.
2007-08-23 18:08:50 +00:00
Ulrich Weigand
82d1552e97
2007-06-18 Markus Deuling <deuling@de.ibm.com>
...
* gdbarch.sh (EXTRACT_RETURN_VALUE): Replace with
gdbarch_extract_return_value.
* value.c (generic_use_struct_convention): Likewise (comment).
* ia64-tdep.c (ia64_use_struct_convention): Likewise (comment).
* arch-utils.c (legacy_return_value): Likewise.
* arch-utils.h (legacy_return_value): Likewise (comment).
* gdbarch.sh (STORE_RETURN_VALUE): Replace by
gdbarch_store_return_value.
* stack.c (return_command): Likewise (comment).
* arch-utils.h (legacy_return_value): Likewise (comment).
* arch-utils.c (legacy_return_value): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.
2007-06-18 18:28:29 +00:00
Ulrich Weigand
ea06eb3dd8
2007-06-12 Markus Deuling <deuling@de.ibm.com>
...
* gdbarch.sh (TARGET_FLOAT_BIT): Replace by gdbarch_float_bit.
* p-lang.c (pascal_create_fundamental_type): Likewise.
* objc-lang.c (objc_create_fundamental_type): Likewise.
* mdebugread.c (_initialize_mdebugread): Likewise.
* m2-lang.c (m2_create_fundamental_type)
(_initialize_m2_language): Likewise.
* gdbtypes.c (build_gdbtypes): Likewise.
* f-lang.c (f_create_fundamental_type, build_fortran_types): Likewise.
* doublest.c (floatformat_from_length): Likewise.
* c-lang.c (c_create_fundamental_type): Likewise.
* ada-lang.c (ada_create_fundamental_type)
(ada_language_arch_info): Likewise.
* gdbarch.sh (TARGET_FLOAT_FORMAT): Replace by gdbarch_float_format.
* value.c (unpack_double): Likewise (comment).
* gdbtypes.c (build_gdbtypes): Likewise.
* doublest.c (floatformat_from_length): Likewise.
* gdbarch.sh (TARGET_DOUBLE_BIT): Replace by gdbarch_double_bit.
* valarith.c (value_binop): Likewise.
* p-lang.c (pascal_create_fundamental_type): Likewise.
* objc-lang.c (objc_create_fundamental_type): Likewise.
* mdebugread.c (_initialize_mdebugread): Likewise.
* m2-lang.c (m2_create_fundamental_type): Likewise.
* gdbtypes.c (build_gdbtypes): Likewise.
* f-lang.c (f_create_fundamental_type, build_fortran_types): Likewise.
* doublest.c (floatformat_from_length): Likewise.
* cris-tdep.c (cris_gdbarch_init): Likewise (comment).
* c-lang.c (c_create_fundamental_type): Likewise.
* ada-lex.l (processReal): Likewise.
* ada-lang.c (ada_create_fundamental_type)
(ada_language_arch_info): Likewise.
* gdbarch.sh (TARGET_DOUBLE_FORMAT): Replace by gdbarch_double_format.
* value.c (unpack_double): Likewise (comment).
* gdbtypes.c (build_gdbtypes): Likewise.
* doublest.c (floatformat_from_length): Likewise.
* gdbarch.sh (TARGET_LONG_DOUBLE_BIT): Replace by
gdbarch_long_double_bit.
* p-lang.c (pascal_create_fundamental_type): Likewise.
* objc-lang.c (objc_create_fundamental_type): Likewise.
* m2-lang.c (m2_create_fundamental_type): Likewise.
* gdbtypes.c (build_gdbtypes): Likewise.
* f-lang.c (f_create_fundamental_type, build_fortran_types): Likewise.
* doublest.c (floatformat_from_length): Likewise.
* c-lang.c (c_create_fundamental_type): Likewise.
* ada-lex.l (processReal): Likewise.
* ada-lang.c (ada_create_fundamental_type)
(ada_language_arch_info): Likewise.
* gdbarch.sh (TARGET_LONG_DOUBLE_FORMAT): Replace by
gdbarch_long_double_format.
* gdbtypes.c (build_gdbtypes): Likewise.
* doublest.c (floatformat_from_length): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.
2007-06-12 16:33:20 +00:00