Age | Commit message (Collapse) | Author | Files | Lines |
|
XMALLOC is defined in defs.h.
Tested by building with --enable-targets=all.
gdb/
2013-08-09 Pedro Alves <palves@redhat.com>
* avr-tdep.c (XMALLOC): Delete macro.
* cli/cli-dump.c (XMALLOC): Delete macro.
|
|
I noticed the functions declared in cli-dump.h aren't used anywhere
outside cli-dump.c.
The original patch that introduced cli-dump.c didn't include this header:
http://sourceware.org/ml/gdb-patches/2002-03/msg00518.html
But for some reason that I couldn't find from reading the archives around
that patch's discussion, cli-dump.h was introduced in the final checkin,
at:
http://sourceware.org/ml/gdb-patches/2002-03/msg00596.html
There seems to be no point in keeping this around nowadays.
gdb/
2013-08-09 Pedro Alves <palves@redhat.com>
* cli/cli-dump.c: Don't include cli/cli-dump.h.
(scan_expression_with_cleanup, scan_filename_with_cleanup)
(fopen_with_cleanup, add_dump_command): Make static.
* cli/cli-dump.h: Delete file.
* Makefile.in (HFILES_NO_SRCDIR): Remove reference to
cli/cli-dump.h.
|
|
Before:
(gdb) tsave ~/a/b
Unable to open file '~/a/b' for saving trace data (No such file or directory)
After:
(gdb) tsave ~/a/b
Unable to open file '/home/pedro/a/b' for saving trace data (No such file or directory)
Tested on x86_64 Fedora 17.
gdb/
2013-08-09 Pedro Alves <palves@redhat.com>
* tracepoint.c (tfile_start): Show tilde-expanded filename in
error message.
|
|
Most commands in GDB show the tilde-expanded filename in user visible
output. This makes "save breakpoints" behave the same.
Before:
(gdb) save breakpoints ~/a/b
Unable to open file '~/a/b' for saving (No such file or directory)
After:
(gdb) save breakpoints ~/a/b
Unable to open file '/home/pedro/a/b' for saving (No such file or directory)
Tested on x86_64 Fedora 17.
gdb/
2013-08-09 Pedro Alves <palves@redhat.com>
* breakpoint.c (save_breakpoints): Show tilde-expanded filename in
error message.
|
|
Most commands in GDB show the tilde-expanded filename in user visible
output. This makes gcore behave the same.
Before:
(gdb) generate-core-file ~/a/b
Failed to open '~/a/b' for output.
(gdb) generate-core-file ~/core
Saved corefile ~/core
After:
(gdb) generate-core-file ~/a/b
Failed to open '/home/pedro/a/b' for output.
(gdb) generate-core-file ~/core
Saved corefile /home/pedro/core
Tested on x86_64 Fedora 17.
gdb/
2013-08-09 Pedro Alves <palves@redhat.com>
* gcore.c (create_gcore_bfd): Don't use tilde_expand here.
(gcore_command): Use tilde_expand here, and when showing the
filename to the user, show the expanded version.
|
|
* stack.c (read_frame_arg): Set 'entryval_error' to NULL if
'entryval' is set.
gdb/testsuite/
* gdb.trace/collection.exp (gdb_collect_args_test): Set
"only" and "both" to 'print entry-values' before selecting
trace frame.
|
|
Before this patch, this fails:
(gdb) generate-core-file ~/core
Failed to open '~/core' for output.
After the patch:
(gdb) generate-core-file ~/core
Saved corefile ~/core
gdb/
2013-08-08 Azat Khuzhin <a3at.mail@gmail.com> (tiny change)
* gcore.c (create_gcore_bfd): Use tilde_expand.
|
|
* frame.h (read_frame_local): Declare.
* mi/mi-cmd-stack.c (list_args_or_locals): Call
read_frame_local.
* stack.c (read_frame_local): New.
gdb/testsuite/
* gdb.trace/mi-trace-unavailable.exp: Don't set
"print entry-values" to "no".
(test_trace_unavailable): Set various values to
"print entry-values" to test that the output of
'-stack-list-locals' is not affected, and then set
set "print entry-values" to "no".
|
|
* mi/mi-cmd-stack.c: Update comments to function
list_args_or_locals.
|
|
* gdb.python/py-value-cc.exp: Update.
* gdb.python/py-value.exp: Use different names for .o files for
C and C++. Only perform C++ tests if !skip_cplus_tests.
|
|
This fixes some derivation.exp regressions with "dwz -m".
The bug here is that the imported PU is given language_minimal.
However, it ought to be C++.
The "pretend language" machinery exists to solve this problem, but it
wasn't handled in process_psymtab_comp_unit. So, this patch adds it
there.
Built and regtested, both normally and using "dwz -m", on x86-64
Fedora 18.
PR symtab/15028:
* dwarf2read.c (struct process_psymtab_comp_unit_data): New.
(process_psymtab_comp_unit_reader): Use it.
(process_psymtab_comp_unit): Update. Add "pretend_language"
argument.
(dwarf2_build_psymtabs_hard): Update.
(scan_partial_symbols): Pass CU's language to
process_psymtab_comp_unit.
|
|
After the previous patch in the series, nothing uses the "quick"
method find_symbol_file.
This patch removes it.
Tested by rebuilding.
* dwarf2read.c (dw2_get_primary_filename_reader): Remove.
(dwarf2_gdb_index_functions): Update.
* psymtab.c (find_symbol_file_from_partial): Remove.
(psym_functions): Update.
* symfile.h (struct quick_symbol_functions) <find_symbol_file>:
Remove.
|
|
With "dwz -m", "main" appears in both the PU and the importing CU when
running anon-struct.exp. However, the PU does not have a file name.
So, find_main_filename returns the empty string, making
deduce_language_from_filename return language_unknown.
This patch fixes this problem by changing gdb to use the ordinary
symbol-lookup functions to find "main"'s symbol. Then, it examines the
symbol's language.
I think this is cleaner than the current approach. For one thing it
avoids trying to guess the language based on the source file name,
instead deferring to the presumably more reliable debuginfo.
Another possible fix would have been to change how the file name is
found via the "qf" methods. However, I think the approach given is
preferable for the reason outlined above.
This required a minor test suite change, as now a symtab is expanded
during the search for "main".
Built and regtested (both ways) on x86-64 Fedora 18.
* symfile.c (set_initial_language): Look up "main" symbol
and use its language.
* symtab.c (find_main_filename): Remove.
* symtab.h (find_main_filename): Remove.
* gdb.base/maint.exp: Allow zero symtabs to be expanded.
|
|
Doug pointed out a while ago that in the final dwz -m patch, nothing
ever set symtab::user.
This patch fixes this oversight and adds a test case showing why it is
important.
Built and regtested (both ways) on x86-64 Fedora 18.
The new test unconditionally tests the partial unit machinery, which I
think is an added plus.
* dwarf2read.c (recursively_compute_inclusions): Add
"immediate_parent" argument. Set symtab's "user" field
if not set.
(compute_symtab_includes): Update.
* gdb.dwarf2/dwz.exp: New file.
|
|
The bug here is that, with dwz -m, a function (and a label) appear in
both a PU and a CU when running cplabel.exp. So, a breakpoint gets
two locations:
(gdb) break foo::bar:to_the_top
Breakpoint 2 at 0x400503: foo::bar:to_the_top. (2 locations)
What is especially wacky is that both locations are at the same place:
(gdb) info b
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE>
1.1 y 0x000000000040051c foo::bar:get_out_of_here
1.2 y 0x000000000040051c foo::bar:get_out_of_here
This happens due to the weird way we run "dwz -m".
It's unclear to me that this would ever happen for real code.
While I think this borders on "diminishing returns" territory, the fix
is pretty straightforward: use the existing address-filtering function
in linespec to also filter when looking at labels.
Built and regtested (both ways) on x86-64 Fedora 18.
* linespec.c (convert_linespec_to_sals): Use maybe_add_address
when adding label symbols.
|
|
Ulrich Weigand <uweigand@de.ibm.com>
* configure.tgt (powerpc64-*-aix*): Match powerpc64 running aix.
* configure.host (powerpc64-*-aix*): Likewise.
|
|
Ulrich Weigand <uweigand@de.ibm.com>
* gdb_ptrace.h: Use ptrace64 instead of ptrace if HAVE_PTRACE64
is defined.
* rs6000-nat.c: Check for __ld_info64_ if compiling 64 BIT gdb.
(rs6000_ptrace32): Call ptrace64 instead of ptrace if present.
(rs6000_ptrace64): Call ptace64 instead of ptracex if present.
* configure.ac: Check for ptrace64.
* configure, config.in: Regenerate.
|
|
Ulrich Weigand <uweigand@de.ibm.com>
* aixthread.c: Call ptrace64 instead of ptracex if defined.
Call ptrace64 instead of ptrace if defined.
Add macro addr_ptr to take care of ptrace address argument.
(pdc_read_regs): Likewise.
(pdc_write_regs): Likewise.
(aix_thread_resume): Likewise.
(fetch_regs_kernel_thread): Likewise.
(store_regs_kernel_thread): Likewise.
|
|
* MAINTAINERS: Add myself to Write After Approval.
|
|
This removes a few more erroneous calls to add_target. These calls
end up installing the target in a user-visible way; but these targets
are all auto-activated and, I think, should never be explicitly
requested.
I have no way to test these.
* aix-thread.c (_initialize_aix_thread): Use
complete_target_initialization.
* bsd-uthread.c (_initialize_bsd_uthread): Use
complete_target_initialization.
* dec-thread.c (_initialize_dec_thread): Use
complete_target_initialization.
* ravenscar-thread.c (_initialize_ravenscar): Use
complete_target_initialization.
* sol-thread.c (_initialize_sol_thread): Use
complete_target_initialization.
* spu-multiarch.c (_initialize_spu_multiarch): Use
complete_target_initialization.
|
|
This is another patch in my ongoing series to "split" objfile to share
more read-only data across inferiors. See
http://sourceware.org/gdb/wiki/ObjfileSplitting
When symbols are finally shared, there will be no back-link from the
symbol to its containing objfile, because there may be more than one
such objfile. So, all such back-links must be removed.
One hidden back-link is the msymbol_objfile function. Since
(eventually) a symbol may appear in more than one objfile, trying to
look up the objfile given just a symbol cannot work.
This patch removes msymbol_objfile in favor of using a bound minimal
symbol. It introduces a new function to make this conversion simpler
in some spots.
The bonus of this patch is that using msymbol_objfile is slower than
simply looking up the owning objfile in the first place.
Built and regtested on x86-64 Fedora 18.
* ada-exp.y (write_var_or_type): Use bound_minimal_symbol.
* ada-lang.c (ada_lookup_simple_minsym): Return
bound_minimal_symbol.
* ada-lang.h (ada_lookup_simple_minsym): Update.
* c-exp.y (variable): Use lookup_bound_minimal_symbol.
* f-exp.y (variable): Use lookup_bound_minimal_symbol.
* go-exp.y (variable): Use lookup_bound_minimal_symbol.
* jv-exp.y (push_expression_name): Use lookup_bound_minimal_symbol.
* m2-exp.y (variable): Use lookup_bound_minimal_symbol.
* minsyms.c (msymbol_objfile): Remove.
(lookup_minimal_symbol_internal): New function, from
lookup_minimal_symbol.
(lookup_minimal_symbol): Rewrite using
lookup_minimal_symbol_internal.
(lookup_bound_minimal_symbol): New function.
* minsyms.h (msymbol_objfile): Remove.
(lookup_bound_minimal_symbol): Declare.
* p-exp.y (variable): Use lookup_bound_minimal_symbol.
* parse.c (write_exp_msymbol): Change parameter to a
bound_minimal_symbol.
(write_dollar_variable): Use lookup_bound_minimal_symbol.
* parser-defs.h (write_exp_msymbol): Update.
* printcmd.c (address_info): Use lookup_bound_minimal_symbol.
* symfile.c (simple_read_overlay_table): Use
lookup_bound_minimal_symbol.
* symtab.c (skip_prologue_sal): Don't use msymbol_objfile.
(search_symbols): Likewise.
(print_msymbol_info): Take a bound_minimal_symbol argument.
(symtab_symbol_info, rbreak_command): Update.
* symtab.h (struct symbol_search) <msymbol>: Change type
to bound_minimal_symbol.
* valops.c (find_function_in_inferior): Use
lookup_bound_minimal_symbol.
* value.c (value_fn_field): Use lookup_bound_minimal_symbol.
|
|
connections.
doc/
2013-08-05 Sanimir Agovic <sanimir.agovic@intel.com>
* gdb.texinfo (TCP port allocation lifecycle): Gdbserver by default
allows for subsequent and not for additional (multiple simultaneous)
connections.
|
|
Code cleanup.
* remote.c (cleanup_sigint_signal_handler): Rename the declaration
to ...
(async_cleanup_sigint_signal_handler): ... this.
(initialize_sigint_signal_handler): Remove declaration.
(handle_remote_sigint): Rename the declaration to ...
(async_handle_remote_sigint): ... this.
(handle_remote_sigint_twice): Rename the declaration to ...
(async_handle_remote_sigint_twice): ... this.
(async_remote_interrupt, async_remote_interrupt_twice)
(remote_interrupt): Remove the declarations.
(remote_interrupt_twice): Rename the declaration ...
(sync_remote_interrupt_twice): ... this.
(sigint_remote_twice_token): Rename the variable to ...
(async_sigint_remote_twice_token): ... this.
(sigint_remote_token): Rename the variable to ...
(async_sigint_remote_token): ... this.
(initialize_sigint_signal_handler): Rename the function to ...
(async_initialize_sigint_signal_handler): ... this. Update the name
inside.
(handle_remote_sigint): Rename the function to ...
(async_handle_remote_sigint): ... this. Update the names inside.
(handle_remote_sigint_twice): Rename the function to ...
(async_handle_remote_sigint_twice): ... this. Update the names inside.
(cleanup_sigint_signal_handler): Rename the function to ...
(async_cleanup_sigint_signal_handler): ... this.
(remote_interrupt): Rename the function to ...
(sync_remote_interrupt): this. Update the names inside.
(remote_interrupt_twice): Rename the function to ...
(sync_remote_interrupt_twice): this. Update the names inside.
(remote_terminal_inferior, remote_terminal_ours, remote_wait_as)
(_initialize_remote): Update the names inside.
|
|
This patch fixes PR symtab/15719.
The bug is that "watch -location" crashes on a certain expression.
The problem is that fetch_subexp_value is catching an exception.
For ordinary watchpoints this is ok; but for location watchpoints,
it is better for the exception to propagate.
Built and regtested on x86-64 Fedora 18.
New test case included.
PR symtab/15719:
* breakpoint.c (update_watchpoint, watchpoint_check)
(watch_command_1): Update.
* eval.c (fetch_subexp_value): Add "preserve_errors"
parameter.
* ppc-linux-nat.c (check_condition): Update.
* value.h (fetch_subexp_value): Update.
* gdb.base/watchpoint.c (struct foo5): New.
(nullptr): New global.
* gdb.base/watchpoint.exp (test_watch_location): Add test.
|
|
http://sourceware.org/ml/gdb-patches/2013-08/msg00067.html
This call to add_file_handler is a duplicate of one that is in
gdb_setup_readline that is always executed.
gdb/ChangeLog
* mi/mi-interp.c (mi_interpreter_resume): Remove call to
add_file_handler.
|
|
* dwarf2read.c (struct dwarf2_per_cu_data): New member tu_read.
(fill_in_sig_entry_from_dwo_entry): Reorganize asserts.
Add assert of sig_entry->dwo_unit == NULL.
(lookup_dwo_signatured_type): Don't assign TU to a DWO if the TU
had already been read.
(read_signatured_type): Set per_cu.tu_read.
testsuite/
* gdb.dwarf2/fission-mix.exp: New file.
* gdb.dwarf2/fission-mix.h: New file.
* gdb.dwarf2/fission-mix.c: New file.
* gdb.dwarf2/fission-mix2.c: New file.
|
|
* valops.c (value_struct_elt): Add missing call to check_typedef.
(value_find_oload_method_list): Ditto.
testsuite/
* gdb.base/func-ptr.exp: New file.
* gdb.base/func-ptr.c: New file.
|
|
effectively, struct symbol_search **.
(make_cleanup_free_search_symbols): Change arg to struct
symbol_search **. All callers updated.
(compare_search_syms): Compare symtab file name and block as well.
(search_symbols_equal): New function.
(sort_search_symbols_remove_dups): Renamed from sort_search_symbols.
New args new_head, new_tail. Result is now void. Remove dups after
sorting the symbols.
(search_symbols): Sort all found symbols once, after all have been
found, and remove duplicates. Simplify cleanup tracking of result.
* symtab.h (make_cleanup_free_search_symbols): Update prototype.
|
|
* dwarf2read.c (recursively_compute_inclusions): Change type of result
parameter to VEC (symtab_ptr) **. New parameter all_type_symtabs.
Watch for duplicate symtabs coming from type units.
(compute_symtab_includes): Update call to
recursively_compute_inclusions. Build vector of included symtabs
instead of per_cus.
* symtab.h (symtab_ptr): New typedef.
(DEF_VEC_P (symtab_ptr)): New VEC type.
* linespec.c (symtab_p): Delete. All uses updated to use symtab_ptr
instead.
|
|
http://sourceware.org/ml/gdb-patches/2013-07/msg00844.html
gdb/ChangeLog
* cli/cli-script.c (script_from_file): Remove use of
error_pre_print.
* main.c (captured_main): Remove use of error_pre_print and
quit_pre_print.
* utils.c (error_pre_print, quit_pre_print): Remove.
* utils.h (error_pre_print, quit_pre_print): Likewise.
|
|
* mi/mi-cmd-stack.c (mi_cmd_stack_list_locals): Parse argv
with mi_getopt.
(mi_cmd_stack_list_variables): Likewise.
|
|
* gdb.python/py-sync-interp.c: New.
* gdb.python/py-sync-interp.exp: New.
|
|
http://sourceware.org/ml/gdb-patches/2013-07/msg00779.html
gdb/ChangeLog
* exceptions.c (deprecated_throw_reason): Remove.
* exceptions.h (deprecated_throw_reason): Remove.
|
|
http://sourceware.org/ml/gdb-patches/2013-07/msg00777.html
gdb/ChangeLog
* remote-mips.c (mips_error): Replace use of
deprecated_throw_reason with throw_verror. Use the error message
passed to mips_error as the error message for throw_verror.
|
|
http://sourceware.org/ml/gdb-patches/2013-07/msg00778.html
gdb/ChangeLog
* monitor.c (monitor_interrupt_query): Replace use of
deprecated_throw_reason with quit.
* nto-procfs.c (interrupt_query): Likewise.
* remote-fileio.c (remote_fileio_sig_exit): Likewise.
* remote-mips.c (mips_kill): Likewise.
* remote.c (interrupt_query): Likewise.
|
|
http://sourceware.org/ml/gdb-patches/2013-07/msg00776.html
gdb/ChangeLog
* utils.c (internal_verror): Replace use of deprecated_throw_reason
with call to fatal.
|
|
* tracepoint.c (trace_dump_command): Select the current frame.
gdb/testsuite/
* gdb.trace/backtrace.exp (gdb_backtrace_tdp_4): Test command
'tdump' on stack frame 0 and 1 respectively.
|
|
PR gdb/13443
* gdb.trace/backtrace.exp (gdb_backtrace_tdp_3): Add parameter
'traceframe'. Wrap test with with_test_prefix.
(top level): Update.
|
|
* gdb.trace/backtrace.exp: Don't invoke 'get_exit' and
'gdb_start'.
Invoke 'prepare_for_testing' instead of 'gdb_compile'.
Use gdb_test_no_output to issue commands 'tstart' and 'tstop'.
|
|
|
|
http://sourceware.org/ml/gdb-patches/2013-07/msg00317.html
gdb/ChangeLog
* value.c (value_fetch_lazy): Mark optimized out values as such
rather than raising an error.
gdb/testsuite/ChangeLog
* gdb.dwarf2/pieces-optimized-out.exp: Expect "<optimized out>"
when printing an optimized out value. Expect an error when using
an optimized out value in an expression.
|
|
http://sourceware.org/ml/gdb-patches/2013-07/msg00316.html
gdb/ChangeLog
* value.c (value_fetch_lazy): Ensure parent value is not lazy
before checking which bits of the parent, not the child, value are
valid.
gdb/testsuite/ChangeLog
* gdb.dwarf2/pieces-optimized-out.exp: New file.
* gdb.dwarf2/pieces-optimized-out.c: New file.
* gdb.dwarf2/pieces-optimized-out.S: New file.
|
|
PR gdb/15715
* top.c: Include "filenames.h".
(set_history_filename): New function.
(init_main): Install it as set hook of the "set history filename"
command.
2013-07-30 Muhammad Bilal <mbilal@codesourcery.com>
PR gdb/15715
* gdb.base/setshow.exp: Test that relative paths passed to
'set history filename' are converted to absolute paths.
|
|
gdb/
2013-07-30 Sanimir Agovic <sanimir.agovic@intel.com>
* dwarf2read.c (dwarf2_get_ref_die_offset): Constify struct
attribute parameter.
(dwarf2_const_value_data): Constify struct attribute parameter.
(dwarf2_const_value): Constify struct attribute parameter.
(dwarf2_const_value_attr): Constify struct attribute parameter.
(lookup_die_type): Constify struct attribute parameter.
(dwarf2_get_attr_constant_value): Constify struct attribute parameter.
(follow_die_ref_or_sig): Constify struct attribute parameter.
(follow_die_ref): Constify struct attribute parameter.
(follow_die_sig): Constify struct attribute parameter.
(get_DW_AT_signature_type): Constify struct attribute parameter.
(get_type_unit_group): Constify struct attribute parameter.
(fill_in_loclist_baton): Constify struct attribute parameter.
(dwarf2_symbol_mark_computed): Constify struct attribute parameter.
(type_unit_group): Constify struct attribute parameter.
|
|
2013-07-30 Sanimir Agovic <sanimir.agovic@intel.com>
gdb/
* dwarf2read.c (attr_form_is_block): Make argument const.
(attr_form_is_section_offset): Make argument const.
(attr_form_is_constant): Make argument const.
(attr_form_is_ref): Make argument const.
|
|
2013-07-30 Sanimir Agovic <sanimir.agovic@intel.com>
gdb/
* dwarf2read.c (attr_is_ref): Rename to attr_form_is_ref.
All uses updated.
(attr_form_is_ref): Moved below attr_form_is_constant.
|
|
|
|
|
|
|
|
|