Tweak handling of remote errors in response to resumption packet
With current master, on a Fedora 27 machine with a kernel with buggy
watchpoint support, I see:
(gdb) PASS: gdb.threads/watchpoint-fork.exp: parent: singlethreaded: hardware breakpoints work
continue
Continuing.
warning: Remote failure reply: E01
Remote communication error. Target disconnected.: Connection reset by peer.
(gdb) FAIL: gdb.threads/watchpoint-fork.exp: parent: singlethreaded: watchpoints work
continue
The program is not being run.
(gdb) FAIL: gdb.threads/watchpoint-fork.exp: parent: singlethreaded: breakpoint after the first fork (the program is no longer running)
The FAILs themselves aren't what's interesting here. What is
interesting is that with the main multi-target patch applied, I was getting this:
(gdb) PASS: gdb.threads/watchpoint-fork.exp: parent: singlethreaded: hardware breakpoints work
continue
Continuing.
warning: Remote failure reply: E01
/home/pedro/brno/pedro/gdb/binutils-gdb-2/build/../src/gdb/inferior.c:285: internal-error: inferior* find_inferior_pid(process_stratum_target*, int): Assertion `pid != 0' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) FAIL: gdb.threads/watchpoint-fork.exp: parent: singlethreaded: watchpoints work (GDB internal error)
The problem is that in remote_target::wait_as, we're hitting this:
switch (buf[0])
{
case 'E': /* Error of some sort. */
/* We're out of sync with the target now. Did it continue or
not? Not is more likely, so report a stop. */
rs->waiting_for_stop_reply = 0;
warning (_("Remote failure reply: %s"), buf);
status->kind = TARGET_WAITKIND_STOPPED;
status->value.sig = GDB_SIGNAL_0;
break;
which leaves event_ptid as null_ptid. At the end of the function, we then reach:
else if (status->kind != TARGET_WAITKIND_EXITED
&& status->kind != TARGET_WAITKIND_SIGNALLED)
{
if (event_ptid != null_ptid)
record_currthread (rs, event_ptid);
else
event_ptid = inferior_ptid; <<<<< here
}
and the trouble is that with the multi-target patch, we'll get here
with inferior_ptid as null_ptid too. That is done exactly to find
these implicit assumptions that inferior_ptid is a good choice for
default thread, which isn't generaly true.
I first thought of fixing this in the "case 'E'" path, but, given that
this "event_ptid = inferior_ptid" path is also taken when the remote
target does not support threads at all, no thread-related packets or
extensions, it's better to fix it in latter path, to handle all
scenarios that miss reporting a thread.
That's what this patch does.
gdb/ChangeLog:
2020-01-10 Pedro Alves <palves@redhat.com>
* remote.c (first_remote_resumed_thread): New.
(remote_target::wait_as): Use it as default event_ptid instead of
inferior_ptid.
2020-01-10 21:05:52 +01:00
|
|
|
|
2020-01-10 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* remote.c (first_remote_resumed_thread): New.
|
|
|
|
|
(remote_target::wait_as): Use it as default event_ptid instead of
|
|
|
|
|
inferior_ptid.
|
|
|
|
|
|
2020-01-10 21:05:51 +01:00
|
|
|
|
2020-01-10 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* infrun.c (handle_no_resumed): Use all_non_exited_inferiors.
|
|
|
|
|
|
2020-01-10 21:05:50 +01:00
|
|
|
|
2020-01-10 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* tracefile-tfile.c (tfile_target::close): Assert that trace_fd is
|
|
|
|
|
not -1.
|
|
|
|
|
|
2020-01-10 21:05:49 +01:00
|
|
|
|
2020-01-10 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* break-catch-sig.c (signal_catchpoint_print_it): Don't pass a
|
|
|
|
|
ptid to get_last_target_status.
|
|
|
|
|
* break-catch-syscall.c (print_it_catch_syscall): Don't pass a
|
|
|
|
|
ptid to get_last_target_status.
|
|
|
|
|
* infcmd.c (continue_command): Don't pass a target_waitstatus to
|
|
|
|
|
get_last_target_status.
|
|
|
|
|
(info_program_command): Don't pass a target_waitstatus to
|
|
|
|
|
get_last_target_status.
|
|
|
|
|
* infrun.c (init_wait_for_inferior): Use
|
|
|
|
|
nullify_last_target_wait_ptid.
|
|
|
|
|
(get_last_target_status): Handle nullptr arguments.
|
|
|
|
|
(nullify_last_target_wait_ptid): Clear target_last_waitstatus.
|
|
|
|
|
(print_stop_event): Don't pass a ptid to get_last_target_status.
|
|
|
|
|
(normal_stop): Don't pass a ptid to get_last_target_status.
|
|
|
|
|
* infrun.h (get_last_target_status, set_last_target_status): Move
|
|
|
|
|
comments here and update.
|
|
|
|
|
(nullify_last_target_wait_ptid): Declare.
|
|
|
|
|
* linux-fork.c (fork_load_infrun_state): Remove local extern
|
|
|
|
|
declaration of nullify_last_target_wait_ptid.
|
|
|
|
|
* linux-nat.c (get_detach_signal): Don't pass a target_waitstatus
|
|
|
|
|
to get_last_target_status.
|
|
|
|
|
|
2020-01-10 21:05:48 +01:00
|
|
|
|
2020-01-10 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* gdbthread.h (scoped_restore_current_thread)
|
|
|
|
|
<dont_restore, restore, m_dont_restore>: Declare.
|
|
|
|
|
* thread.c (thread_alive): Add assertion. Return bool.
|
|
|
|
|
(switch_to_thread_if_alive): New.
|
|
|
|
|
(prune_threads): Switch inferior/thread.
|
|
|
|
|
(print_thread_info_1): Switch thread before calling target methods.
|
|
|
|
|
(scoped_restore_current_thread::restore): New, factored out from
|
|
|
|
|
...
|
|
|
|
|
(scoped_restore_current_thread::~scoped_restore_current_thread):
|
|
|
|
|
... this.
|
|
|
|
|
(scoped_restore_current_thread::scoped_restore_current_thread):
|
|
|
|
|
Add assertion.
|
|
|
|
|
(thread_apply_all_command, thread_select): Use
|
|
|
|
|
switch_to_thread_if_alive.
|
|
|
|
|
* infrun.c (proceed, restart_threads, handle_signal_stop)
|
|
|
|
|
(switch_back_to_stepped_thread): Switch current thread before
|
|
|
|
|
calling target methods.
|
|
|
|
|
|
2020-01-10 21:05:47 +01:00
|
|
|
|
2020-01-10 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* inferior.c (switch_to_inferior_no_thread): New function,
|
|
|
|
|
factored out from ...
|
|
|
|
|
(inferior_command): ... here.
|
|
|
|
|
* inferior.h (switch_to_inferior_no_thread): Declare.
|
|
|
|
|
* mi/mi-main.c (run_one_inferior): Use
|
|
|
|
|
switch_to_inferior_no_thread.
|
|
|
|
|
|
Delete unnecessary code from kill_command
I believe this comment:
/* Killing off the inferior can leave us with a core file. If
so, print the state we are left in. */
Referred to the fact that a decade ago, by design, GDB would let you
type "run" when debugging a core dump, keeping the core open. That
"run" would push a process_stratum target on the target stack for the
live process, and, the core would remain open -- we used to have a
core_stratum. When the live process was killed/detached or exited,
GDB would go back to debugging the core, since the core_stratum target
was now at the top of the stack. That design had a number of
problems, see here for example:
https://sourceware.org/ml/gdb-patches/2008-08/msg00290.html
In 2010, core_stratum was finaly eliminated and cores now have
process_stratum too, with commit c0edd9edadfe ("Make core files the
process_stratum."). Pushing a live process on the stack while you're
debugging a core discards the core completely.
I also thought that this might be in use with checkpoints, but it does
not -- "kill" when you have multiple checkpoints kills all the
checkpoints.
gdb/ChangeLog:
2020-01-10 Pedro Alves <palves@redhat.com>
* infcmd.c (kill_command): Remove dead code.
2020-01-10 21:05:46 +01:00
|
|
|
|
2020-01-10 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* infcmd.c (kill_command): Remove dead code.
|
|
|
|
|
|
Don't check target is running in remote_target::mourn_inferior
I believe the tail end of remote_target::mourn_inferior is broken, and
it's been broken for too long to even bother trying to fix. Most
probably nobody needs it. If the code is reached and we find the
target is running, we'd need to resync the thread list, at least,
since generic_mourn_inferior got rid of all the threads in the
inferior, otherwise, we'd hit an assertion on the next call to
inferior_thread(), for example. A "correct" fix would probably
involve restarting the whole remote_target::start_remote requence,
exactly as if we had completely disconnected and reconnected from
scratch.
Note that regular stub debugging usually uses plain target remote, but
this code is only reachable in target extended-mode:
- The !remote_multi_process_p check means that it's only reacheable if
the stub does not support multi-process. I.e., there can only ever
be one live process.
- remote_target::mourn_inferior has this at the top:
/* In 'target remote' mode with one inferior, we close the connection. */
if (!rs->extended && number_of_live_inferiors () <= 1)
{
unpush_target (this);
/* remote_close takes care of doing most of the clean up. */
generic_mourn_inferior ();
return;
}
Which means that if we only had one live inferior (which for our
case, must be true), we'll have closed the connection already,
unless we're in extended-remote mode.
gdb/ChangeLog:
2020-01-10 Pedro Alves <palves@redhat.com>
* remote.c (remote_target::mourn_inferior): No longer check
whether the target is running.
2020-01-10 21:05:45 +01:00
|
|
|
|
2020-01-10 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* remote.c (remote_target::mourn_inferior): No longer check
|
|
|
|
|
whether the target is running.
|
|
|
|
|
|
Make target_ops::has_execution take an 'inferior *' instead of a ptid_t
With the multi-target work, each inferior will have its own target
stack, so to call a target method, we'll need to make sure that the
inferior in question is the current one, otherwise target->beneath()
calls will find the target beneath in the wrong inferior.
In some places, it's much more convenient to be able to check whether
an inferior has execution without having to switch to it in order to
call target_has_execution on the right inferior/target stack, to avoid
side effects with switching inferior/thread/program space.
The current target_ops::has_execution method takes a ptid_t as
parameter, which, in a multi-target world, isn't sufficient to
identify the target. This patch prepares to address that, by changing
the parameter to an inferior pointer instead. From the inferior,
we'll be able to query its target stack to tell which target is
beneath.
Also adds a new inferior::has_execution() method to make callers a bit
more natural to read.
gdb/ChangeLog:
2020-01-10 Pedro Alves <palves@redhat.com>
* corelow.c (core_target::has_execution): Change parameter type to
inferior pointer.
* inferior.c (number_of_live_inferiors): Use
inferior::has_execution instead of target_has_execution_1.
* inferior.h (inferior::has_execution): New.
* linux-thread-db.c (thread_db_target::update_thread_list): Use
inferior::has_execution instead of target_has_execution_1.
* process-stratum-target.c
(process_stratum_target::has_execution): Change parameter type to
inferior pointer. Check the inferior's PID instead of
inferior_ptid.
* process-stratum-target.h
(process_stratum_target::has_execution): Change parameter type to
inferior pointer.
* record-full.c (record_full_core_target::has_execution): Change
parameter type to inferior pointer.
* target.c (target_has_execution_1): Change parameter type to
inferior pointer.
(target_has_execution_current): Adjust.
* target.h (target_ops::has_execution): Change parameter type to
inferior pointer.
(target_has_execution_1): Change parameter type to inferior
pointer. Change return type to bool.
* tracefile.h (tracefile_target::has_execution): Change parameter
type to inferior pointer.
2020-01-10 21:05:44 +01:00
|
|
|
|
2020-01-10 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* corelow.c (core_target::has_execution): Change parameter type to
|
|
|
|
|
inferior pointer.
|
|
|
|
|
* inferior.c (number_of_live_inferiors): Use
|
|
|
|
|
inferior::has_execution instead of target_has_execution_1.
|
|
|
|
|
* inferior.h (inferior::has_execution): New.
|
|
|
|
|
* linux-thread-db.c (thread_db_target::update_thread_list): Use
|
|
|
|
|
inferior::has_execution instead of target_has_execution_1.
|
|
|
|
|
* process-stratum-target.c
|
|
|
|
|
(process_stratum_target::has_execution): Change parameter type to
|
|
|
|
|
inferior pointer. Check the inferior's PID instead of
|
|
|
|
|
inferior_ptid.
|
|
|
|
|
* process-stratum-target.h
|
|
|
|
|
(process_stratum_target::has_execution): Change parameter type to
|
|
|
|
|
inferior pointer.
|
|
|
|
|
* record-full.c (record_full_core_target::has_execution): Change
|
|
|
|
|
parameter type to inferior pointer.
|
|
|
|
|
* target.c (target_has_execution_1): Change parameter type to
|
|
|
|
|
inferior pointer.
|
|
|
|
|
(target_has_execution_current): Adjust.
|
|
|
|
|
* target.h (target_ops::has_execution): Change parameter type to
|
|
|
|
|
inferior pointer.
|
|
|
|
|
(target_has_execution_1): Change parameter type to inferior
|
|
|
|
|
pointer. Change return type to bool.
|
|
|
|
|
* tracefile.h (tracefile_target::has_execution): Change parameter
|
|
|
|
|
type to inferior pointer.
|
|
|
|
|
|
2020-01-10 21:05:43 +01:00
|
|
|
|
2020-01-10 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* exceptions.c (print_flush): Remove current_top_target() check.
|
|
|
|
|
|
2020-01-10 21:05:42 +01:00
|
|
|
|
2020-01-10 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* remote.c (show_remote_exec_file): Show the current inferior's
|
|
|
|
|
exec-file instead of the command variable's value.
|
|
|
|
|
|
2020-01-10 21:05:41 +01:00
|
|
|
|
2020-01-10 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* record-full.c (record_full_resume_ptid): New global.
|
|
|
|
|
(record_full_target::resume): Set it.
|
|
|
|
|
(record_full_wait_1): Use record_full_resume_ptid instead of
|
|
|
|
|
inferior_ptid.
|
|
|
|
|
|
Preserve selected thread in all-stop w/ background execution
In non-stop mode, if you resume the program in the background (with
"continue&", for example), then gdb makes sure to not switch the
current thread behind your back. That means that you can be sure that
the commands you type apply to the thread you selected, even if some
other thread that was running in the background hits some event just
while you're typing.
In all-stop mode, however, if you resume the program in the
background, gdb let's the current thread switch behind your back.
This is bogus, of course. All-stop and non-stop background
resumptions should behave the same.
This patch fixes that, and adds a testcase that exposes the bad
behavior in current master.
The fork-running-state.exp changes are necessary because that
preexisting testcase was expecting the old behavior:
Before:
continue &
Continuing.
(gdb)
[Attaching after process 8199 fork to child process 8203]
[New inferior 2 (process 8203)]
info threads
Id Target Id Frame
1.1 process 8199 "fork-running-st" (running)
* 2.1 process 8203 "fork-running-st" (running)
(gdb)
After:
continue &
Continuing.
(gdb)
[Attaching after process 24660 fork to child process 24664]
[New inferior 2 (process 24664)]
info threads
Id Target Id Frame
* 1.1 process 24660 "fork-running-st" (running)
2.1 process 24664 "fork-running-st" (running)
(gdb)
Here we see that before this patch GDB switches current inferior to
the new inferior behind the user's back, as a side effect of handling
the fork.
The delete_exited_threads call in inferior_appeared is there to fix an
issue that Baris found in a previous version of this patch. The
fetch_inferior_event change increases the refcount of the current
thread, and in case the fetched inferior event denotes a thread exit,
the thread will not be deleted right away. A non-deleted but exited
thread stays in the inferior's thread list. This, in turn, causes the
"init_thread_list" call in inferior.c to be skipped. A consequence is
that the global thread ID counter is not restarted if the current
thread exits, and then the inferior is restarted:
(gdb) start
Temporary breakpoint 1 at 0x4004d6: file main.c, line 21.
Starting program: /tmp/main
Temporary breakpoint 1, main () at main.c:21
21 foo ();
(gdb) info threads -gid
Id GId Target Id Frame
* 1 1 process 16106 "main" main () at main.c:21
(gdb) c
Continuing.
[Inferior 1 (process 16106) exited normally]
(gdb) start
Temporary breakpoint 2 at 0x4004d6: file main.c, line 21.
Starting program: /tmp/main
Temporary breakpoint 2, main () at main.c:21
21 foo ();
(gdb) info threads -gid
Id GId Target Id Frame
* 1 2 process 16138 "main" main () at main.c:21
^^^
Notice that GId == 2 above. It should have been "1" instead.
The new tids-git-reset.exp testcase exercises the problem above.
gdb/ChangeLog:
2020-01-10 Pedro Alves <palves@redhat.com>
* gdbthread.h (scoped_restore_current_thread)
<dont_restore, restore, m_dont_restore>: Declare.
* thread.c (thread_alive): Add assertion. Return bool.
(switch_to_thread_if_alive): New.
(prune_threads): Switch inferior/thread.
(print_thread_info_1): Switch thread before calling target methods.
(scoped_restore_current_thread::restore): New, factored out from
...
(scoped_restore_current_thread::~scoped_restore_current_thread):
... this.
(scoped_restore_current_thread::scoped_restore_current_thread):
Add assertion.
(thread_apply_all_command, thread_select): Use
switch_to_thread_if_alive.
gdb/testsuite/ChangeLog:
2020-01-10 Pedro Alves <palves@redhat.com>
* gdb.base/fork-running-state.exp (do_test): Adjust expected
output.
* gdb.threads/async.c: New.
* gdb.threads/async.exp: New.
* gdb.multi/tids-gid-reset.c: New.
* gdb.multi/tids-gid-reset.exp: New.
2020-01-10 21:05:41 +01:00
|
|
|
|
2020-01-10 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* gdbthread.h (scoped_restore_current_thread)
|
|
|
|
|
<dont_restore, restore, m_dont_restore>: Declare.
|
|
|
|
|
* thread.c (thread_alive): Add assertion. Return bool.
|
|
|
|
|
(switch_to_thread_if_alive): New.
|
|
|
|
|
(prune_threads): Switch inferior/thread.
|
|
|
|
|
(print_thread_info_1): Switch thread before calling target methods.
|
|
|
|
|
(scoped_restore_current_thread::restore): New, factored out from
|
|
|
|
|
...
|
|
|
|
|
(scoped_restore_current_thread::~scoped_restore_current_thread):
|
|
|
|
|
... this.
|
|
|
|
|
(scoped_restore_current_thread::scoped_restore_current_thread):
|
|
|
|
|
Add assertion.
|
|
|
|
|
(thread_apply_all_command, thread_select): Use
|
|
|
|
|
switch_to_thread_if_alive.
|
|
|
|
|
|
2020-01-10 20:30:28 +01:00
|
|
|
|
2020-01-10 George Barrett <bob@bob131.so>
|
|
|
|
|
|
|
|
|
|
* stap-probe.c (stap_modify_semaphore): Don't check for null
|
|
|
|
|
semaphores.
|
|
|
|
|
(stap_probe::set_semaphore, stap_probe::clear_semaphore): Check
|
|
|
|
|
for null semaphores.
|
|
|
|
|
|
2020-01-07 12:39:17 +01:00
|
|
|
|
2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
|
|
|
|
|
|
|
|
|
|
* tui/tui-source.c (tui_source_window::do_scroll_vertical): Update
|
|
|
|
|
all source windows, and maintain horizontal scroll status while
|
|
|
|
|
doing so.
|
|
|
|
|
|
2019-12-23 00:52:56 +01:00
|
|
|
|
2020-01-09 Tom Tromey <tom@tromey.com>
|
|
|
|
|
|
|
|
|
|
PR tui/18932:
|
|
|
|
|
* tui/tui-source.c (tui_source_window::do_scroll_vertical): Call
|
|
|
|
|
update_source_window, not print_source_lines.
|
|
|
|
|
|
2020-01-07 01:41:08 +01:00
|
|
|
|
2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
|
|
|
|
|
|
|
|
|
|
* tui/tui.c (tui_enable): Register tui hooks after calling
|
|
|
|
|
tui_display_main.
|
|
|
|
|
|
2019-12-18 19:06:43 +01:00
|
|
|
|
2020-01-09 Christian Biesinger <cbiesinger@google.com>
|
|
|
|
|
|
|
|
|
|
* gdbsupport/common-defs.h: Don't define _FORTIFY_SOURCE on MinGW.
|
|
|
|
|
|
2020-01-08 22:55:03 +01:00
|
|
|
|
2020-01-08 Simon Marchi <simon.marchi@efficios.com>
|
|
|
|
|
|
|
|
|
|
* thread.c (print_thread_info_1): Fix indentation.
|
|
|
|
|
|
2020-01-08 02:10:40 +01:00
|
|
|
|
2020-01-09 Christian Biesinger <cbiesinger@google.com>
|
|
|
|
|
|
|
|
|
|
* symtab.c (general_symbol_info::compute_and_set_names): Move the
|
|
|
|
|
unique_xmalloc_ptr outside the if to always free the demangled name.
|
|
|
|
|
|
Change section_offsets to a std::vector
This changes section_offsets to be specialization of a std::vector and
updates all the users. It also removes the ANOFFSET and
SIZEOF_N_SECTION_OFFSETS macros.
Most of this is just a generic sort of cleanup, that reduces the
number of lines of code. However, a couple spots were doing weird
things.
objfile_relocate did:
- std::vector<struct section_offsets>
- new_debug_offsets (SIZEOF_N_SECTION_OFFSETS (debug_objfile->num_sections));
... which seems to greatly over-estimate the number of elements
needed.
This appeared in set_objfile_default_section_offset:
- std::vector<struct section_offsets> offsets (objf->num_sections,
- { { offset } });
... which makes sense due to type safety, but is also actively
confusing given that section_offsets was previously also a kind of
vector type.
Tested on x86-64 Fedora 30.
gdb/ChangeLog
2020-01-08 Tom Tromey <tromey@adacore.com>
* xcoffread.c (enter_line_range, read_xcoff_symtab)
(process_xcoff_symbol, xcoff_symfile_offsets): Update.
* symtab.h (MSYMBOL_VALUE_ADDRESS): Update.
(struct section_offsets, ANOFFSET, SIZEOF_N_SECTION_OFFSETS):
Remove.
(section_offsets): New typedef.
* symtab.c (fixup_section, get_msymbol_address): Update.
* symmisc.c (dump_msymbols): Update.
* symfile.h (relative_addr_info_to_section_offsets)
(symfile_map_offsets_to_segments): Update.
* symfile.c (build_section_addr_info_from_objfile)
(init_objfile_sect_indices): Update.
(struct place_section_arg): Change type of "offsets".
(place_section): Update.
(relative_addr_info_to_section_offsets): Change type of
"section_offsets". Remove "num_sections" parameter.
(default_symfile_offsets, syms_from_objfile_1)
(set_objfile_default_section_offset): Update.
(reread_symbols): No need to preserve section offsets by hand.
(symfile_map_offsets_to_segments): Change type of "offsets".
* stap-probe.c (relocate_address): Update.
* stabsread.h (process_one_symbol): Update.
* solib-target.c (struct lm_info_target) <offsets>: Change type.
(solib_target_relocate_section_addresses): Update.
* solib-svr4.c (enable_break, svr4_relocate_main_executable):
Update.
* solib-frv.c (frv_relocate_main_executable): Update.
* solib-dsbt.c (dsbt_relocate_main_executable): Update.
* solib-aix.c (solib_aix_get_section_offsets): Change return
type.
(solib_aix_solib_create_inferior_hook): Update.
* remote.c (remote_target::get_offsets): Update.
* psymtab.c (find_pc_sect_psymtab): Update.
* psympriv.h (struct partial_symbol) <address, text_low,
text_high>: Update.
* objfiles.h (obj_section_offset): Update.
(struct objfile) <section_offsets>: Change type.
<num_sections>: Remove.
(objfile_relocate): Update.
* objfiles.c (entry_point_address_query): Update
(relocate_one_symbol): Change type of "section_offsets".
(objfile_relocate1, objfile_relocate1): Change type of
"new_offsets".
(objfile_rebase1): Update.
* mipsread.c (mipscoff_symfile_read): Update.
(read_alphacoff_dynamic_symtab): Remove "section_offsets"
parameter.
* mdebugread.c (parse_symbol): Change type of "section_offsets".
(parse_external, psymtab_to_symtab_1): Update.
* machoread.c (macho_symfile_offsets): Update.
* ia64-tdep.c (ia64_find_unwind_table): Update.
* hppa-tdep.c (read_unwind_info): Update.
* hppa-bsd-tdep.c (hppabsd_find_global_pointer): Update.
* dwarf2read.c (create_addrmap_from_index)
(create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
(process_psymtab_comp_unit_reader, add_partial_symbol)
(add_partial_subprogram, process_full_comp_unit)
(read_file_scope, read_func_scope, read_lexical_block_scope)
(read_call_site_scope, dwarf2_rnglists_process)
(dwarf2_ranges_process, dwarf2_ranges_read)
(dwarf_decode_lines_1, var_decode_location, new_symbol)
(dwarf2_fetch_die_loc_sect_off, dwarf2_per_cu_text_offset):
Update.
* dwarf2-frame.c (execute_cfa_program, dwarf2_frame_find_fde):
Update.
* dtrace-probe.c (dtrace_probe::get_relocated_address): Update.
* dbxread.c (read_dbx_symtab, read_ofile_symtab): Update.
(process_one_symbol): Change type of "section_offsets".
* ctfread.c (get_objfile_text_range): Update.
* coffread.c (coff_symtab_read, enter_linenos)
(process_coff_symbol): Update.
* coff-pe-read.c (add_pe_forwarded_sym): Update.
* amd64-windows-tdep.c (amd64_windows_find_unwind_info): Update.
Change-Id: I147eb967e9b44d82f4048039de7bb44b80cd72fb
2020-01-06 22:34:52 +01:00
|
|
|
|
2020-01-08 Tom Tromey <tromey@adacore.com>
|
|
|
|
|
|
|
|
|
|
* xcoffread.c (enter_line_range, read_xcoff_symtab)
|
|
|
|
|
(process_xcoff_symbol, xcoff_symfile_offsets): Update.
|
|
|
|
|
* symtab.h (MSYMBOL_VALUE_ADDRESS): Update.
|
|
|
|
|
(struct section_offsets, ANOFFSET, SIZEOF_N_SECTION_OFFSETS):
|
|
|
|
|
Remove.
|
|
|
|
|
(section_offsets): New typedef.
|
|
|
|
|
* symtab.c (fixup_section, get_msymbol_address): Update.
|
|
|
|
|
* symmisc.c (dump_msymbols): Update.
|
|
|
|
|
* symfile.h (relative_addr_info_to_section_offsets)
|
|
|
|
|
(symfile_map_offsets_to_segments): Update.
|
|
|
|
|
* symfile.c (build_section_addr_info_from_objfile)
|
|
|
|
|
(init_objfile_sect_indices): Update.
|
|
|
|
|
(struct place_section_arg): Change type of "offsets".
|
|
|
|
|
(place_section): Update.
|
|
|
|
|
(relative_addr_info_to_section_offsets): Change type of
|
|
|
|
|
"section_offsets". Remove "num_sections" parameter.
|
|
|
|
|
(default_symfile_offsets, syms_from_objfile_1)
|
|
|
|
|
(set_objfile_default_section_offset): Update.
|
|
|
|
|
(reread_symbols): No need to preserve section offsets by hand.
|
|
|
|
|
(symfile_map_offsets_to_segments): Change type of "offsets".
|
|
|
|
|
* stap-probe.c (relocate_address): Update.
|
|
|
|
|
* stabsread.h (process_one_symbol): Update.
|
|
|
|
|
* solib-target.c (struct lm_info_target) <offsets>: Change type.
|
|
|
|
|
(solib_target_relocate_section_addresses): Update.
|
|
|
|
|
* solib-svr4.c (enable_break, svr4_relocate_main_executable):
|
|
|
|
|
Update.
|
|
|
|
|
* solib-frv.c (frv_relocate_main_executable): Update.
|
|
|
|
|
* solib-dsbt.c (dsbt_relocate_main_executable): Update.
|
|
|
|
|
* solib-aix.c (solib_aix_get_section_offsets): Change return
|
|
|
|
|
type.
|
|
|
|
|
(solib_aix_solib_create_inferior_hook): Update.
|
|
|
|
|
* remote.c (remote_target::get_offsets): Update.
|
|
|
|
|
* psymtab.c (find_pc_sect_psymtab): Update.
|
|
|
|
|
* psympriv.h (struct partial_symbol) <address, text_low,
|
|
|
|
|
text_high>: Update.
|
|
|
|
|
* objfiles.h (obj_section_offset): Update.
|
|
|
|
|
(struct objfile) <section_offsets>: Change type.
|
|
|
|
|
<num_sections>: Remove.
|
|
|
|
|
(objfile_relocate): Update.
|
|
|
|
|
* objfiles.c (entry_point_address_query): Update
|
|
|
|
|
(relocate_one_symbol): Change type of "section_offsets".
|
|
|
|
|
(objfile_relocate1, objfile_relocate1): Change type of
|
|
|
|
|
"new_offsets".
|
|
|
|
|
(objfile_rebase1): Update.
|
|
|
|
|
* mipsread.c (mipscoff_symfile_read): Update.
|
|
|
|
|
(read_alphacoff_dynamic_symtab): Remove "section_offsets"
|
|
|
|
|
parameter.
|
|
|
|
|
* mdebugread.c (parse_symbol): Change type of "section_offsets".
|
|
|
|
|
(parse_external, psymtab_to_symtab_1): Update.
|
|
|
|
|
* machoread.c (macho_symfile_offsets): Update.
|
|
|
|
|
* ia64-tdep.c (ia64_find_unwind_table): Update.
|
|
|
|
|
* hppa-tdep.c (read_unwind_info): Update.
|
|
|
|
|
* hppa-bsd-tdep.c (hppabsd_find_global_pointer): Update.
|
|
|
|
|
* dwarf2read.c (create_addrmap_from_index)
|
|
|
|
|
(create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
|
|
|
|
|
(process_psymtab_comp_unit_reader, add_partial_symbol)
|
|
|
|
|
(add_partial_subprogram, process_full_comp_unit)
|
|
|
|
|
(read_file_scope, read_func_scope, read_lexical_block_scope)
|
|
|
|
|
(read_call_site_scope, dwarf2_rnglists_process)
|
|
|
|
|
(dwarf2_ranges_process, dwarf2_ranges_read)
|
|
|
|
|
(dwarf_decode_lines_1, var_decode_location, new_symbol)
|
|
|
|
|
(dwarf2_fetch_die_loc_sect_off, dwarf2_per_cu_text_offset):
|
|
|
|
|
Update.
|
|
|
|
|
* dwarf2-frame.c (execute_cfa_program, dwarf2_frame_find_fde):
|
|
|
|
|
Update.
|
|
|
|
|
* dtrace-probe.c (dtrace_probe::get_relocated_address): Update.
|
|
|
|
|
* dbxread.c (read_dbx_symtab, read_ofile_symtab): Update.
|
|
|
|
|
(process_one_symbol): Change type of "section_offsets".
|
|
|
|
|
* ctfread.c (get_objfile_text_range): Update.
|
|
|
|
|
* coffread.c (coff_symtab_read, enter_linenos)
|
|
|
|
|
(process_coff_symbol): Update.
|
|
|
|
|
* coff-pe-read.c (add_pe_forwarded_sym): Update.
|
|
|
|
|
* amd64-windows-tdep.c (amd64_windows_find_unwind_info): Update.
|
|
|
|
|
|
2019-10-31 17:46:18 +01:00
|
|
|
|
2020-01-08 Tom Tromey <tromey@adacore.com>
|
|
|
|
|
|
|
|
|
|
* dwarf2read.c (parse_macro_definition): Use std::string.
|
|
|
|
|
(parse_macro_definition): Likewise.
|
|
|
|
|
|
2019-10-31 17:37:35 +01:00
|
|
|
|
2020-01-08 Tom Tromey <tromey@adacore.com>
|
|
|
|
|
|
|
|
|
|
* dwarf2read.c (abbrev_table_read_table): Use std::vector.
|
|
|
|
|
(ATTR_ALLOC_CHUNK): Remove.
|
|
|
|
|
|
2019-10-31 17:34:40 +01:00
|
|
|
|
2020-01-08 Tom Tromey <tromey@adacore.com>
|
|
|
|
|
|
|
|
|
|
* dwarf2read.c (fixup_go_packaging): Use unique_xmalloc_ptr.
|
|
|
|
|
|
2019-10-31 17:31:28 +01:00
|
|
|
|
2020-01-08 Tom Tromey <tromey@adacore.com>
|
|
|
|
|
|
|
|
|
|
* dwarf2read.c (add_partial_symbol): Use unique_xmalloc_ptr.
|
|
|
|
|
(dwarf2_compute_name, open_dwo_file): Likewise.
|
|
|
|
|
(process_enumeration_scope): Use std::vector.
|
|
|
|
|
(guess_partial_die_structure_name): Use unique_xmalloc_ptr.
|
|
|
|
|
(partial_die_info::fixup, dwarf2_start_subfile)
|
|
|
|
|
(guess_full_die_structure_name, dwarf2_name): Likewise.
|
|
|
|
|
(determine_prefix): Update.
|
|
|
|
|
(guess_full_die_structure_name): Make return type const.
|
|
|
|
|
(partial_die_full_name): Return unique_xmalloc_ptr.
|
|
|
|
|
(DW_FIELD_ALLOC_CHUNK): Remove.
|
|
|
|
|
|
2019-12-19 19:35:22 +01:00
|
|
|
|
2020-01-07 Tom Tromey <tromey@adacore.com>
|
|
|
|
|
|
|
|
|
|
PR build/24937:
|
|
|
|
|
* stap-probe.c (class stap_static_probe_ops): Add constructor.
|
|
|
|
|
|
2019-12-29 23:26:41 +01:00
|
|
|
|
2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
|
|
|
|
|
|
|
|
|
|
* cli/cli-style.c: Set cli_styling to 'true' in the Cygwin build.
|
|
|
|
|
|
2019-12-26 21:56:01 +01:00
|
|
|
|
2020-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
|
|
|
|
|
|
|
|
|
|
* stack.c (print_frame_info): Move disassemble_next_line code
|
|
|
|
|
inside source_print block.
|
|
|
|
|
|
2020-01-06 20:54:21 +01:00
|
|
|
|
2020-01-06 Eli Zaretskii <eliz@gnu.org>
|
|
|
|
|
|
|
|
|
|
* gdbsupport/gdb_wait.c: Include <signal.h> instead of
|
|
|
|
|
gdb/signals.h, as we are now using native signal symbols.
|
|
|
|
|
|
2020-01-06 15:27:32 +01:00
|
|
|
|
2020-01-06 Shahab Vahedi <shahab@synopsys.com>
|
|
|
|
|
|
|
|
|
|
* tui/tui-disasm.c (tui_disasm_window::addr_is_displayed): Avoid
|
|
|
|
|
overflow by an early check of content vs threshold.
|
|
|
|
|
* tui/tui-source.c (tui_source_window::line_is_displayed):
|
|
|
|
|
Likewise.
|
|
|
|
|
|
2020-01-06 20:25:23 +01:00
|
|
|
|
2020-01-06 Eli Zaretskii <eliz@gnu.org>
|
|
|
|
|
|
|
|
|
|
* NEWS: Mention the recent fix of $_exitsignal on MS-Windows.
|
|
|
|
|
|
2020-01-02 01:25:56 +01:00
|
|
|
|
2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
|
|
|
|
|
|
|
|
|
|
* coff-pe-read.c (read_pe_exported_syms): Don't try to read the
|
|
|
|
|
export table if no section contains it's RVA.
|
|
|
|
|
|
2020-01-06 19:22:15 +01:00
|
|
|
|
2020-01-06 Eli Zaretskii <eliz@gnu.org>
|
|
|
|
|
|
|
|
|
|
* windows-tdep.c: Fix a typo in WINDOWS_SIGABRT.
|
|
|
|
|
|
2019-12-22 14:58:22 +01:00
|
|
|
|
2020-01-06 Hannes Domani <ssbssa@yahoo.de>
|
|
|
|
|
|
|
|
|
|
* source.c (print_source_lines_base): Set last_line_listed.
|
|
|
|
|
|
2020-01-06 13:54:18 +01:00
|
|
|
|
2020-01-06 Shahab Vahedi <shahab@synopsys.com>
|
|
|
|
|
|
|
|
|
|
* tui/tui-disasm.c: Remove trailing spaces.
|
|
|
|
|
|
2020-01-06 12:51:54 +01:00
|
|
|
|
2020-01-06 Eli Zaretskii <eliz@gnu.org>
|
|
|
|
|
Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* Makefile.in (COMMON_SFILES): Add gdbsupport/gdb_wait.c.
|
|
|
|
|
* windows-tdep.c: New enumeration of WINDOWS_SIG* signals.
|
|
|
|
|
(windows_gdb_signal_to_target): New function, uses the above
|
|
|
|
|
enumeration to convert GDB internal signal codes to equivalent
|
|
|
|
|
Windows codes.
|
|
|
|
|
(windows_init_abi): Call set_gdbarch_gdb_signal_to_target.
|
|
|
|
|
* windows-nat.c: Include "gdb_wait.h".
|
|
|
|
|
(get_windows_debug_event): Extract the fatal exception from the
|
|
|
|
|
exit status and convert to the equivalent Posix signal number.
|
|
|
|
|
* cli/cli-cmds.c (exit_status_set_internal_vars): Account for the
|
|
|
|
|
possibility that WTERMSIG returns GDB_SIGNAL_UNKNOWN.
|
|
|
|
|
* gdbsupport/gdb_wait.c: New file, implements
|
|
|
|
|
windows_status_to_termsig.
|
|
|
|
|
* gdbsupport/gdb_wait.h (WIFEXITED, WIFSIGNALED, WEXITSTATUS)
|
|
|
|
|
(WTERMSIG) [__MINGW32__]: Separate definitions for MinGW.
|
|
|
|
|
|
2019-12-23 00:45:31 +01:00
|
|
|
|
2020-01-05 Andrew Burgess <andrew.burgess@embecosm.com>
|
|
|
|
|
|
|
|
|
|
* tui/tui-layout.c (tui_add_win_to_layout): Use tui_set_layout not
|
|
|
|
|
show_layout.
|
|
|
|
|
|
2020-01-03 20:08:16 +01:00
|
|
|
|
2020-01-05 Luis Machado <luis.machado@linaro.org>
|
|
|
|
|
|
|
|
|
|
* aarch64-linux-nat.c
|
|
|
|
|
(aarch64_linux_nat_target::thread_architecture): Use bfd_arch_aarch64
|
|
|
|
|
and bfd_mach_aarch64.
|
|
|
|
|
|
2019-12-15 17:58:16 +01:00
|
|
|
|
2020-01-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
|
|
|
|
|
|
|
|
|
|
* ui-file.c (stdio_file::can_emit_style_escape)
|
|
|
|
|
(tee_file::can_emit_style_escape): Ensure style is used also on
|
|
|
|
|
gdb_stderr when gdb_stderr is a tty supporting styling, similarly
|
|
|
|
|
to gdb_stdout.
|
|
|
|
|
* main.c (set_gdb_data_directory): Use file style to output the
|
|
|
|
|
warning that the given pathname is not a directory.
|
|
|
|
|
* top.c (show_history_filename, gdb_safe_append_history)
|
|
|
|
|
(show_gdb_datadir): Use file style.
|
|
|
|
|
|
2019-12-27 13:41:58 +01:00
|
|
|
|
2020-01-03 Hannes Domani <ssbssa@yahoo.de>
|
|
|
|
|
|
|
|
|
|
* solib-target.c (struct lm_info_target):
|
|
|
|
|
Change offsets to be a unique_xmalloc_ptr.
|
|
|
|
|
(solib_target_relocate_section_addresses): Update.
|
|
|
|
|
|
2019-12-24 13:14:01 +01:00
|
|
|
|
2020-01-03 Hannes Domani <ssbssa@yahoo.de>
|
|
|
|
|
|
|
|
|
|
* windows-nat.c (windows_clear_solib): Free so_list linked list.
|
|
|
|
|
|
2020-01-03 09:16:38 +01:00
|
|
|
|
2020-01-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
|
|
|
|
|
|
|
|
|
|
* MAINTAINERS (Write After Approval): Add myself.
|
|
|
|
|
|
2019-12-30 19:47:10 +01:00
|
|
|
|
2020-01-02 Luis Machado <luis.machado@linaro.org>
|
|
|
|
|
|
|
|
|
|
* proc-service.c (get_ps_regcache): Remove reference to obsolete
|
|
|
|
|
Cell BE architecture.
|
|
|
|
|
* target.h (struct target_ops) <thread_architecture>: Likewise.
|
|
|
|
|
|
2019-12-30 17:01:02 +01:00
|
|
|
|
2020-01-01 Hannes Domani <ssbssa@yahoo.de>
|
|
|
|
|
|
|
|
|
|
* Makefile.in: Use INSTALL_PROGRAM_ENV.
|
|
|
|
|
|
2020-01-01 13:00:28 +01:00
|
|
|
|
2020-01-01 Hannes Domani <ssbssa@yahoo.de>
|
|
|
|
|
|
|
|
|
|
* MAINTAINERS (Write After Approval): Add myself.
|
|
|
|
|
|
2020-01-01 07:37:10 +01:00
|
|
|
|
2020-01-01 Joel Brobecker <brobecker@adacore.com>
|
|
|
|
|
|
|
|
|
|
* gdbarch.sh: Update copyright year range of generated files.
|
|
|
|
|
|
2020-01-01 07:20:01 +01:00
|
|
|
|
2020-01-01 Joel Brobecker <brobecker@adacore.com>
|
|
|
|
|
|
|
|
|
|
Update copyright year range in all GDB files.
|
|
|
|
|
|
2020-01-01 07:12:57 +01:00
|
|
|
|
2020-01-01 Joel Brobecker <brobecker@adacore.com>
|
|
|
|
|
|
|
|
|
|
* copyright.py: Convert to Python 3.
|
|
|
|
|
|
2020-01-01 06:19:14 +01:00
|
|
|
|
2020-01-01 Joel Brobecker <brobecker@adacore.com>
|
|
|
|
|
|
|
|
|
|
* copyright.py: Adapt after move of gnulib directory from gdb
|
|
|
|
|
directory to toplevel directory.
|
|
|
|
|
|
2020-01-01 06:08:08 +01:00
|
|
|
|
2020-01-01 Joel Brobecker <brobecker@adacore.com>
|
|
|
|
|
|
|
|
|
|
* copyright.py (main): Exit if run from the wrong directory.
|
|
|
|
|
|
2020-01-01 05:43:08 +01:00
|
|
|
|
2020-01-01 Joel Brobecker <brobecker@adacore.com>
|
|
|
|
|
|
|
|
|
|
* top.c (print_gdb_version): Change copyright year to 2020.
|
|
|
|
|
|
2020-01-01 05:40:23 +01:00
|
|
|
|
2020-01-01 Joel Brobecker <brobecker@adacore.com>
|
2019-12-30 17:11:32 +01:00
|
|
|
|
|
2020-01-01 05:40:23 +01:00
|
|
|
|
* config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2019.
|
2019-12-30 17:11:32 +01:00
|
|
|
|
|
2020-01-01 05:40:23 +01:00
|
|
|
|
For older changes see ChangeLog-2019.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
Local Variables:
|
|
|
|
|
mode: change-log
|
|
|
|
|
left-margin: 8
|
|
|
|
|
fill-column: 74
|
|
|
|
|
version-control: never
|
2007-08-10 00:44:38 +02:00
|
|
|
|
coding: utf-8
|
1999-04-16 03:35:26 +02:00
|
|
|
|
End:
|