public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] jankratochvil/gdbserverbuildid: sticky
@ 2015-08-13 10:40 jkratoch
0 siblings, 0 replies; 8+ messages in thread
From: jkratoch @ 2015-08-13 10:40 UTC (permalink / raw)
To: archer-commits
The branch, jankratochvil/gdbserverbuildid has been updated
discards ae009c1b5c62233bc52c92bb13829fbdf3f738d7 (commit)
discards 4ed402d23c9bc7587d6ebeb98aac1c89f0e2996c (commit)
discards d6adbe2e2ea7cafa38a43192c558dc5fb986e9e2 (commit)
discards 62c380d107f284c732691bc1cf483c7001bf0575 (commit)
discards f2c851971ab84f0b66b2512e00116d0cec15abe7 (commit)
discards 63c8894843b98d28081a1a4ac9b22416ef139048 (commit)
discards 01a167f13792d059fa27d18054793c3ed3adb2b3 (commit)
discards f2e33a76348337f91f9be5a54f328e3c070a869b (commit)
discards 388cf8787adb0db1a5751311181c5ae6ff2fcab8 (commit)
discards 27854d1c85f0c689fec9e6c7617d09fb2c78be3a (commit)
discards f53fe5034f3b652e3bd4424eb9c3641cf057b37e (commit)
discards f3fb5a6526fe3ffdc2314290507a209acae2a5f1 (commit)
discards 1f28d772f900f8963ffaed2b7c37edfcd40efc92 (commit)
discards 486a40586c5f428a13048cef5c1575ebb9f18b61 (commit)
discards 18d4031ae35ae4a5dcb03f5eeba6cd43fa713700 (commit)
discards 0501d9df3ad566c9d66fb814584852dbd0930739 (commit)
discards b21b3a3f00a0dd80ee641d7aa12e950e977303c1 (commit)
discards 80432f849322811c259a05c8bd9a638a73e88cd5 (commit)
via f975d18d3004c9e94572ae7ffd4f999f87f80789 (commit)
via 5d9fe80e2f8fa1f5be7ebac7fbc949ecf9ef5bff (commit)
via 7c5f60122e4d26c473e20e6fdfe359afeaefb47d (commit)
via 56b758842d2db86be20e6a5ca38b523dd26d548f (commit)
via c94619a21113490af5ec998d7f1d24e371fa9640 (commit)
via 49969d8c4672a677f52fe60457969cd897dd53df (commit)
via 77a40858ba8b6554da1090ffdd0d20cf0c70f6a1 (commit)
via a0e710b8adadb856bf39f5c5a9f275f84dd9a3ba (commit)
via 045fcf62670e30bdc5d8af524046d3bb3f9221eb (commit)
via 1ea2fe5053ab1113dfb672c680ccff1be2f290b9 (commit)
via 5fd3c99615b2ab8c9aa8abc21337be115fcd37cd (commit)
via 7ac5e9d57bc417c75c97f51f7c44fa55ee9c169b (commit)
via c4e403dfad6c919454ef5d2663712853b6bcbae8 (commit)
via d0d477a45c5d4ecdc2820d4d0414056d3023ae13 (commit)
via ca83807584ebd8716a66f7088dd05271002e99d9 (commit)
via 4f5d6aa4fce87c00f74b0f205535ebcec7302e27 (commit)
via 12e1597a9084f5d4f122d00a011870ef00c92334 (commit)
via 6e55ed2607f6efdc058a5b6605914e6f92193189 (commit)
from ae009c1b5c62233bc52c92bb13829fbdf3f738d7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit f975d18d3004c9e94572ae7ffd4f999f87f80789
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:45 2015 +0200
sticky
Message-Id: <1433754079-10395-1-git-send-email-gbenson@redhat.com>
Philippe Waroquiers wrote:
> On Fri, 2015-06-05 at 12:22 +0100, Gary Benson wrote:
> > Built and regtested on RHEL6.6 x86_64.
> I tested with the last SVN version of the Valgrind gdbserver (that
> supports qXfer:exec-file:read+).
>
> The patch introduces a regression:
> with the patch, GDB does not anymore automatically load the
> exec-file.
>
> I bypassed this problem by ignoring fake_pid_p in remote.c:
> --- a/gdb/remote.c
> +++ b/gdb/remote.c
> @@ -1624,9 +1624,13 @@ remote_add_inferior (int fake_pid_p, int pid, int
> attached,
> inf->attach_flag = attached;
> inf->fake_pid_p = fake_pid_p;
>
> - /* If no main executable is currently open then attempt to
> - open the file that was executed to create this inferior. */
> - if (try_open_exec && get_exec_file (0) == NULL)
> + /* Attempt to open the file that was executed to create this
> + inferior. If the user has explicitly specified executable
> + and/or symbol files then warn the user if their choices do
> + not match. Otherwise, set exec_file and symfile_objfile to
> + the new file. */
> + printf("fake_pid_p %d\n", fake_pid_p);
> + if (try_open_exec)// && !fake_pid_p)
> exec_file_locate_attach (pid, 1);
>
> Effectively, the printf shows that with Valgrind gdbsrv,
> fake_pid_p value is 1.
>
> When ignoring fake_pid_p, GDB can properly attach
> to different Valgrind gdbsrv, and changes of executable
> as expected.
Ah, it seems I mailed a bad patch, my apologies! I was working on
two fixes that touched the same line, and it looks like I rebased
them in the wrong order.
This updated patch has been created against the latest gdb/master
(80fb91378c91a8239817a5ab2b1c3e346109db25). Could you please try
your tests again?
Thanks,
Gary
---
On attach, GDB will only attempt to determine the main executable's
filename if one is not already set. This causes problems if you
attach to one process and then attach to another: GDB will not attempt
to discover the main executable on the second attach. If the two
processes have different main executable files then the symbols will
now be wrong. This is PR gdb/17626.
In GDB some filenames are supplied by the user (e.g. using the "file"
or "symbol-file" commands) and some are determined by GDB (e.g. while
processing an "attach" command). This commit updates GDB to track
which filenames were supplied by the user. When GDB might attempt to
determine an executable filename and one is already set, filenames
determined by GDB may be overridden but user-supplied filenames will
not.
gdb/ChangeLog:
PR gdb/17626
* progspace.h (struct program_space)
<pspace_exec_file_is_user_supplied>: New field.
<symfile_object_file_is_user_supplied>: Likewise.
(symfile_objfile_is_user_supplied): New macro.
* exec.h (exec_file_is_user_supplied): Likewise.
* exec.c (exec_close): Clear exec_file_is_user_supplied.
(exec_file_locate_attach): Remove get_exec_file check.
Do not replace user-supplied executable or symbol files.
Warn if user-supplied executable or symbol files do not
match discovered file.
(exec_file_command): Set exec_file_is_user_supplied.
* symfile.c (symbol_file_clear): Clear
symfile_objfile_is_user_supplied.
(symbol_file_command): Set symfile_objfile_is_user_supplied.
* inferior.c (add_inferior_command): Set
exec_file_is_user_supplied and symfile_objfile_is_user_supplied.
* main.c (captured_main): Likewise.
* infcmd.c (attach_command_post_wait): Always call
exec_file_locate_attach. Only call reopen_exec_file and
reread_symbols if exec_file_is_user_supplied.
* remote.c (remote_add_inferior): Remove get_exec_file check
around exec_file_locate_attach.
commit 5d9fe80e2f8fa1f5be7ebac7fbc949ecf9ef5bff
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:44 2015 +0200
mainbuildid
commit 7c5f60122e4d26c473e20e6fdfe359afeaefb47d
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:44 2015 +0200
hexallocate
commit 56b758842d2db86be20e6a5ca38b523dd26d548f
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:44 2015 +0200
locatetest
commit c94619a21113490af5ec998d7f1d24e371fa9640
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sun Jul 12 20:59:03 2015 +0200
Tests for validate symbol file using build-id
New testcase.
gdb/testsuite/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Tests for validate symbol file using build-id.
* gdb.base/solib-mismatch-lib.c: New file.
* gdb.base/solib-mismatch-libmod.c: New file.
* gdb.base/solib-mismatch.c: New file.
* gdb.base/solib-mismatch.exp: New file.
commit 49969d8c4672a677f52fe60457969cd897dd53df
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:43 2015 +0200
buildidwarn
commit 77a40858ba8b6554da1090ffdd0d20cf0c70f6a1
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:43 2015 +0200
buildidsolibbfdopen
commit a0e710b8adadb856bf39f5c5a9f275f84dd9a3ba
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:43 2015 +0200
buildidverify
commit 045fcf62670e30bdc5d8af524046d3bb3f9221eb
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:43 2015 +0200
buildidsolibsearch
commit 1ea2fe5053ab1113dfb672c680ccff1be2f290b9
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:43 2015 +0200
buildidtofile
commit 5fd3c99615b2ab8c9aa8abc21337be115fcd37cd
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:42 2015 +0200
buildidproto
commit 7ac5e9d57bc417c75c97f51f7c44fa55ee9c169b
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:42 2015 +0200
buildidtobfd
commit c4e403dfad6c919454ef5d2663712853b6bcbae8
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:42 2015 +0200
buildidforcemove
commit d0d477a45c5d4ecdc2820d4d0414056d3023ae13
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:42 2015 +0200
buildidfreefix
commit ca83807584ebd8716a66f7088dd05271002e99d9
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:41 2015 +0200
openpsymfile
commit 4f5d6aa4fce87c00f74b0f205535ebcec7302e27
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:41 2015 +0200
openpsolib
commit 12e1597a9084f5d4f122d00a011870ef00c92334
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:41 2015 +0200
openp
commit 6e55ed2607f6efdc058a5b6605914e6f92193189
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:41 2015 +0200
filelib
-----------------------------------------------------------------------
Summary of changes:
gdb/build-id.c | 2 +-
gdb/defs.h | 6 +++++
gdb/exec.c | 4 +-
gdb/nto-tdep.c | 2 +-
gdb/solib.c | 32 ++++++++++++++--------------
gdb/source.c | 63 +++++++++++++++++++++++++++++++++++--------------------
gdb/source.h | 2 +-
7 files changed, 67 insertions(+), 44 deletions(-)
First 500 lines of diff:
diff --git a/gdb/build-id.c b/gdb/build-id.c
index 037d710..d3986bc 100644
--- a/gdb/build-id.c
+++ b/gdb/build-id.c
@@ -148,7 +148,7 @@ build_id_to_file (size_t build_id_len, const bfd_byte *build_id,
s += sprintf (s, "%02x", (unsigned) *data++);
strcpy (s, suffix);
- result = file_location_from_filename (link, is_bfd, build_id_len, build_id);
+ result = file_location_from_filename (link, (is_bfd ? OPF_IS_BFD : OPF_NONE), build_id_len, build_id);
if (file_location_is_valid (&result))
{
do_cleanups (back_to);
diff --git a/gdb/defs.h b/gdb/defs.h
index 2e91d83..0011635 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -318,9 +318,15 @@ extern const char *pc_prefix (CORE_ADDR);
/* See openp function definition for their description. */
enum openp_flags
{
+ OPF_NONE = 0,
OPF_TRY_CWD_FIRST = (1 << 0),
OPF_SEARCH_IN_PATH = (1 << 1),
OPF_IS_BFD = (1 << 2),
+
+ /* bfd_get_filename can be incorrect then, use only if you keep your
+ original filename separate from resulting bfd.
+ Returned file_location.filename is not canonicalized. */
+ OPF_BFD_CANONICAL = (1 << 3),
};
extern int openp (const char *, enum openp_flags, const char *, char **);
diff --git a/gdb/exec.c b/gdb/exec.c
index 68ebc31..4d0e646 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -234,14 +234,14 @@ exec_file_attach (const char *filename, int from_tty)
struct target_section *sections = NULL, *sections_end = NULL;
char **matching;
- exec_bfd = openp_bfd (getenv ("PATH"), OPF_TRY_CWD_FIRST, filename);
+ exec_bfd = openp_bfd (getenv ("PATH"), OPF_TRY_CWD_FIRST | OPF_BFD_CANONICAL, filename);
#if defined(__GO32__) || defined(_WIN32) || defined(__CYGWIN__)
if (exec_bfd == NULL)
{
char *exename = alloca (strlen (filename) + 5);
strcat (strcpy (exename, filename), ".exe");
- exec_bfd = openp_bfd (getenv ("PATH"), OPF_TRY_CWD_FIRST, exename);
+ exec_bfd = openp_bfd (getenv ("PATH"), OPF_TRY_CWD_FIRST | OPF_BFD_CANONICAL, exename);
}
#endif
if (exec_bfd == NULL)
diff --git a/gdb/nto-tdep.c b/gdb/nto-tdep.c
index 5bb0e7f..e923222 100644
--- a/gdb/nto-tdep.c
+++ b/gdb/nto-tdep.c
@@ -135,7 +135,7 @@ nto_find_and_open_solib (char *solib, size_t build_idsz, const gdb_byte *build_i
file_location_free (&file);
xsnprintf (arch_path, arch_len, "/%s", solib);
- return file_location_from_filename (arch_path, 1 /* is_bfd */, build_idsz, build_id);
+ return file_location_from_filename (arch_path, OPF_IS_BFD, build_idsz, build_id);
}
void
diff --git a/gdb/solib.c b/gdb/solib.c
index acb2eb1..d6ec58e 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -152,7 +152,7 @@ show_solib_search_path (struct ui_file *file, int from_tty,
*/
static struct file_location
-solib_find_3 (char *in_pathname, int is_bfd, int is_solib, const char *sysroot, size_t build_idsz, const gdb_byte *build_id)
+solib_find_3 (char *in_pathname, enum openp_flags opts, int is_solib, const char *sysroot, size_t build_idsz, const gdb_byte *build_id)
{
const struct target_so_ops *ops = solib_ops (target_gdbarch ());
char *temp_pathname;
@@ -251,7 +251,7 @@ solib_find_3 (char *in_pathname, int is_bfd, int is_solib, const char *sysroot,
}
/* Now see if we can open it. */
- file = file_location_from_filename (temp_pathname, is_bfd, build_idsz, build_id);
+ file = file_location_from_filename (temp_pathname, opts, build_idsz, build_id);
if (file_location_is_valid (&file))
{
do_cleanups (old_chain);
@@ -279,7 +279,7 @@ solib_find_3 (char *in_pathname, int is_bfd, int is_solib, const char *sysroot,
in_pathname + 2, (char *) NULL);
xfree (drive);
- file = file_location_from_filename (temp_pathname, is_bfd, build_idsz, build_id);
+ file = file_location_from_filename (temp_pathname, opts, build_idsz, build_id);
if (file_location_is_valid (&file))
{
do_cleanups (old_chain);
@@ -299,7 +299,7 @@ solib_find_3 (char *in_pathname, int is_bfd, int is_solib, const char *sysroot,
need_dir_separator ? SLASH_STRING : "",
in_pathname + 2, (char *) NULL);
- file = file_location_from_filename (temp_pathname, is_bfd, build_idsz, build_id);
+ file = file_location_from_filename (temp_pathname, opts, build_idsz, build_id);
if (file_location_is_valid (&file))
{
do_cleanups (old_chain);
@@ -316,7 +316,7 @@ solib_find_3 (char *in_pathname, int is_bfd, int is_solib, const char *sysroot,
if (build_idsz != 0)
{
- file = build_id_to_file (build_idsz, build_id, "", is_bfd);
+ file = build_id_to_file (build_idsz, build_id, "", (opts & OPF_IS_BFD) != 0);
if (file_location_is_valid (&file))
{
do_cleanups (old_chain);
@@ -344,7 +344,7 @@ solib_find_3 (char *in_pathname, int is_bfd, int is_solib, const char *sysroot,
solib_search_path (if any). */
if (is_solib && solib_search_path != NULL)
{
- file = openp_file (solib_search_path, OPF_TRY_CWD_FIRST | (is_bfd ? OPF_IS_BFD : 0), in_pathname, build_idsz, build_id);
+ file = openp_file (solib_search_path, OPF_TRY_CWD_FIRST | opts, in_pathname, build_idsz, build_id);
if (file_location_is_valid (&file))
{
file.filename = gdb_realpath_and_xfree (file.filename);
@@ -359,7 +359,7 @@ solib_find_3 (char *in_pathname, int is_bfd, int is_solib, const char *sysroot,
from the opened path. */
if (is_solib && solib_search_path != NULL)
{
- file = openp_file (solib_search_path, OPF_TRY_CWD_FIRST | (is_bfd ? OPF_IS_BFD : 0), target_lbasename (fskind, in_pathname), build_idsz, build_id);
+ file = openp_file (solib_search_path, OPF_TRY_CWD_FIRST | opts, target_lbasename (fskind, in_pathname), build_idsz, build_id);
if (file_location_is_valid (&file))
{
file.filename = gdb_realpath_and_xfree (file.filename);
@@ -381,7 +381,7 @@ solib_find_3 (char *in_pathname, int is_bfd, int is_solib, const char *sysroot,
/* If not found, next search the inferior's $PATH environment variable. */
if (sysroot == NULL)
{
- file = openp_file (get_in_environ (current_inferior ()->environment, "PATH"), OPF_TRY_CWD_FIRST | (is_bfd ? OPF_IS_BFD : 0), in_pathname, build_idsz, build_id);
+ file = openp_file (get_in_environ (current_inferior ()->environment, "PATH"), OPF_TRY_CWD_FIRST | opts, in_pathname, build_idsz, build_id);
if (file_location_is_valid (&file))
{
file.filename = gdb_realpath_and_xfree (file.filename);
@@ -394,7 +394,7 @@ solib_find_3 (char *in_pathname, int is_bfd, int is_solib, const char *sysroot,
inferior's $LD_LIBRARY_PATH environment variable. */
if (is_solib && sysroot == NULL)
{
- file = openp_file (get_in_environ (current_inferior ()->environment, "LD_LIBRARY_PATH"), OPF_TRY_CWD_FIRST | (is_bfd ? OPF_IS_BFD : 0), in_pathname, build_idsz, build_id);
+ file = openp_file (get_in_environ (current_inferior ()->environment, "LD_LIBRARY_PATH"), OPF_TRY_CWD_FIRST | opts, in_pathname, build_idsz, build_id);
if (file_location_is_valid (&file))
{
file.filename = gdb_realpath_and_xfree (file.filename);
@@ -408,7 +408,7 @@ solib_find_3 (char *in_pathname, int is_bfd, int is_solib, const char *sysroot,
}
static struct file_location
-solib_find_2 (char *in_pathname, int is_bfd, int is_solib, size_t build_idsz, const gdb_byte *build_id)
+solib_find_2 (char *in_pathname, enum openp_flags opts, int is_solib, size_t build_idsz, const gdb_byte *build_id)
{
VEC (char_ptr) *sysroot_vec;
struct cleanup *back_to;
@@ -421,7 +421,7 @@ solib_find_2 (char *in_pathname, int is_bfd, int is_solib, size_t build_idsz, co
for (ix = 0; VEC_iterate (char_ptr, sysroot_vec, ix, sysroot); ++ix)
{
- file = solib_find_3 (in_pathname, is_bfd, is_solib, sysroot, build_idsz, build_id);
+ file = solib_find_3 (in_pathname, opts, is_solib, sysroot, build_idsz, build_id);
if (file_location_is_valid (&file))
{
do_cleanups (back_to);
@@ -438,7 +438,7 @@ static char *
solib_find_1 (char *in_pathname, size_t build_idsz, const gdb_byte *build_id,
int *fd, int is_solib)
{
- struct file_location file = solib_find_2 (in_pathname, 0 /* is_bfd */, is_solib, build_idsz, build_id);
+ struct file_location file = solib_find_2 (in_pathname, OPF_NONE, is_solib, build_idsz, build_id);
char *retval;
if (!file_location_is_valid (&file))
@@ -502,7 +502,7 @@ exec_file_find (char *in_pathname, int *fd)
above. */
static struct file_location
-solib_find_file (char *in_pathname, int is_bfd, size_t build_idsz, const gdb_byte *build_id)
+solib_find_file (char *in_pathname, enum openp_flags opts, size_t build_idsz, const gdb_byte *build_id)
{
const char *solib_symbols_extension
= gdbarch_solib_symbols_extension (target_gdbarch ());
@@ -530,14 +530,14 @@ solib_find_file (char *in_pathname, int is_bfd, size_t build_idsz, const gdb_byt
}
}
- return solib_find_2 (in_pathname, is_bfd, 1 /* is_solib */, build_idsz, build_id);
+ return solib_find_2 (in_pathname, opts, 1 /* is_solib */, build_idsz, build_id);
}
char *
solib_find (char *in_pathname, size_t build_idsz, const gdb_byte *build_id,
int *fd)
{
- struct file_location file = solib_find_file (in_pathname, 0 /* is_bfd */, build_idsz, build_id);
+ struct file_location file = solib_find_file (in_pathname, OPF_NONE, build_idsz, build_id);
char *retval;
if (!file_location_is_valid (&file))
@@ -598,7 +598,7 @@ solib_bfd_open (char *pathname, size_t build_idsz, const gdb_byte *build_id)
const struct bfd_arch_info *b;
/* Search for shared library file. */
- file = solib_find_file (pathname, 1 /* is_bfd */, build_idsz, build_id);
+ file = solib_find_file (pathname, OPF_IS_BFD, build_idsz, build_id);
if (!file_location_is_valid (&file))
{
/* Return failure if the file could not be found, so that we can
diff --git a/gdb/source.c b/gdb/source.c
index 3c35075..827699d 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -782,7 +782,7 @@ file_location_is_valid (const struct file_location *file)
}
struct file_location
-file_location_from_filename (const char *filename, int is_bfd, size_t build_idsz, const gdb_byte *build_id)
+file_location_from_filename (const char *filename, enum openp_flags opts, size_t build_idsz, const gdb_byte *build_id)
{
struct file_location file;
int load_via_target = 0;
@@ -824,7 +824,7 @@ file_location_from_filename (const char *filename, int is_bfd, size_t build_idsz
}
else
{
- /* WRITE_FILES is ignored if !IS_BFD. */
+ /* WRITE_FILES is ignored if !OPF_IS_BFD. */
file.fd = gdb_open_cloexec (filename, O_RDONLY | O_BINARY, 0);
if (file.fd == -1)
@@ -835,7 +835,7 @@ file_location_from_filename (const char *filename, int is_bfd, size_t build_idsz
}
}
- if (build_idsz == 0 && !is_bfd)
+ if (build_idsz == 0 && (opts & OPF_IS_BFD) == 0)
{
discard_cleanups (back_to);
return file;
@@ -843,31 +843,47 @@ file_location_from_filename (const char *filename, int is_bfd, size_t build_idsz
if (load_via_target)
{
- const int do_close = is_bfd;
+ const int do_close = (opts & OPF_IS_BFD) != 0;
gdb_assert (strcmp (filename, file.filename + strlen (TARGET_SYSROOT_PREFIX)) == 0);
file.abfd = gdb_bfd_open_from_target (file.filename, gnutarget, file.fd, do_close);
if (do_close && file.abfd != NULL)
file.fd = -1;
}
- else if (write_files)
- {
- file.abfd = gdb_bfd_fopen (filename, gnutarget, FOPEN_RUB, file.fd);
- file.fd = -1;
- }
else
{
- char *canonical;
+ if (write_files)
+ file.abfd = gdb_bfd_fopen (filename, gnutarget, FOPEN_RUB, file.fd);
+ else if ((opts & OPF_BFD_CANONICAL) == 0)
+ file.abfd = gdb_bfd_open (filename, gnutarget, file.fd);
+ else
+ {
+ char *canonical;
- /* gdb_bfd_open (and its variants) prefers canonicalized
- pathname for better BFD caching. */
- struct cleanup *canonical_cleanup;
+ /* gdb_bfd_open (and its variants) prefers canonicalized
+ pathname for better BFD caching. */
+ struct cleanup *canonical_cleanup;
+
+ canonical = gdb_realpath (filename);
+ canonical_cleanup = make_cleanup (xfree, canonical);
+ file.abfd = gdb_bfd_open (canonical, gnutarget, file.fd);
+ do_cleanups (canonical_cleanup);
+ }
+ if ((opts & OPF_IS_BFD) != 0)
+ file.fd = -1;
+ else
+ {
+ file.fd = dup (file.fd);
+ if (file.fd == -1)
+ {
+ int save_errno = errno;
- canonical = gdb_realpath (filename);
- canonical_cleanup = make_cleanup (xfree, canonical);
- file.abfd = gdb_bfd_open (canonical, gnutarget, file.fd);
- file.fd = -1;
- do_cleanups (canonical_cleanup);
+ do_cleanups (back_to);
+ file_location_enoent (&file);
+ file.file_errno = save_errno;
+ return file;
+ }
+ }
}
if (file.abfd == NULL)
@@ -879,7 +895,7 @@ file_location_from_filename (const char *filename, int is_bfd, size_t build_idsz
if (build_idsz == 0)
{
- gdb_assert (is_bfd);
+ gdb_assert ((opts & OPF_IS_BFD) != 0);
discard_cleanups (back_to);
return file;
}
@@ -891,7 +907,7 @@ file_location_from_filename (const char *filename, int is_bfd, size_t build_idsz
return file;
}
- if (!is_bfd)
+ if ((opts & OPF_IS_BFD) == 0)
{
gdb_bfd_unref (file.abfd);
file.abfd = NULL;
@@ -936,7 +952,7 @@ file_location_to_bfd (struct file_location file)
bfd *
filename_to_bfd (const char *filename)
{
- return file_location_to_bfd (file_location_from_filename (filename, 1 /* is_bfd */, 0 /* build_idsz */, NULL /* build_id */));
+ return file_location_to_bfd (file_location_from_filename (filename, OPF_IS_BFD, 0 /* build_idsz */, NULL /* build_id */));
}
int
@@ -1014,6 +1030,7 @@ openp_file (const char *path, enum openp_flags opts, const char *string, size_t
struct file_location file;
gdb_assert (string != NULL);
+ gdb_assert ((opts & (OPF_IS_BFD | OPF_BFD_CANONICAL)) != OPF_BFD_CANONICAL);
/* A file with an empty name cannot possibly exist. Report a failure
without further checking.
@@ -1039,7 +1056,7 @@ openp_file (const char *path, enum openp_flags opts, const char *string, size_t
{
filename = alloca (strlen (string) + 1);
strcpy (filename, string);
- file = file_location_from_filename (filename, (opts & OPF_IS_BFD) != 0, build_idsz, build_id);
+ file = file_location_from_filename (filename, opts, build_idsz, build_id);
if (file_location_is_valid (&file))
return file;
file_location_free (&file);
@@ -1136,7 +1153,7 @@ openp_file (const char *path, enum openp_flags opts, const char *string, size_t
if (is_target_filename (filename) || is_regular_file (filename))
{
- file = file_location_from_filename (filename, (opts & OPF_IS_BFD) != 0, build_idsz, build_id);
+ file = file_location_from_filename (filename, opts, build_idsz, build_id);
if (file_location_is_valid (&file))
{
do_cleanups (back_to);
diff --git a/gdb/source.h b/gdb/source.h
index 7571cef..e079cf0 100644
--- a/gdb/source.h
+++ b/gdb/source.h
@@ -116,7 +116,7 @@ extern void file_location_free (struct file_location *file);
extern int file_location_is_valid (const struct file_location *file);
-extern struct file_location file_location_from_filename (const char *filename, int is_bfd, size_t build_idsz, const gdb_byte *build_id);
+extern struct file_location file_location_from_filename (const char *filename, enum openp_flags opts, size_t build_idsz, const gdb_byte *build_id);
extern bfd *file_location_to_bfd (struct file_location file);
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [SCM] jankratochvil/gdbserverbuildid: sticky
@ 2015-08-16 20:12 jkratoch
0 siblings, 0 replies; 8+ messages in thread
From: jkratoch @ 2015-08-16 20:12 UTC (permalink / raw)
To: archer-commits
The branch, jankratochvil/gdbserverbuildid has been updated
discards 7a947a6bd868ee8559dca4a2b16b894ea654b8fd (commit)
via ea8ad7ecbd272bdfaaa28fbef8dbd24cd14caa8a (commit)
from 7a947a6bd868ee8559dca4a2b16b894ea654b8fd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit ea8ad7ecbd272bdfaaa28fbef8dbd24cd14caa8a
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sun Aug 16 22:11:19 2015 +0200
sticky
Message-ID: <559A7C37.6020501@redhat.com>
On 07/03/2015 04:44 PM, Pedro Alves wrote:
> (I still suspect that if we reverse the sense of the flag, then
> its management ends up being more centralized, as then the
> place that sets it is also the place that needs to check it,
> instead of doing that in multiple places. But, see below.)
It didn't seem fair to impose a subjective preference, so I tried
this in order to understand it myself, and I now agree that is really
doesn't make much difference, as then we'd have to mark
auto-discovered in a few more places that I wasn't originally
seeing. There's at least the execd handling in infrun.c, and
also spu_symbol_file_add_from_memory.
As I was playing with this already, I poked at the other review
points I made, and came up with the variant of the patch below.
> This function is called while the passed in PID is not the
> current inferior. E.g., the remote_add_inferior path.
>
> Therefore seems to me that these symbol_file_add_main / exec_file_attach
> calls can change the symbols of the wrong inferior.
...
> I also notice that reread_symbols has an exec_file_attach
> call which seems to me results in losing the is_user_supplied
> flag if the executable's timestamp changed, at least here:
>
>> + /* Attempt to open the file that was executed to create this
>> + inferior. If the user has explicitly specified executable
>> + and/or symbol files then warn the user if their choices do
>> + not match. Otherwise, set exec_file and symfile_objfile to
>> + the new file. */
>> + exec_file_locate_attach (ptid_get_pid (inferior_ptid), from_tty);
>> +
>> + if (exec_file_is_user_supplied)
>> {
>> reopen_exec_file ();
>> reread_symbols ();
>
>
> I also notice that the clone-inferior command ends up with
> an exec_file_attach call in clone_program_space. That one
> should probably be setting the is_user_supplied flag too,
> I'd think. Or at least, copying it from the original.
>
> At this point, I'm wondering about adding a parameter to
> exec_file_attach to force considering (now and in future)
> the right value to put in the flag in each case.
I tried this too (see patch below). As this requires touching the user-supplied
paths anyway, it didn't really matter to tag files user-supplied or
auto-discovered, so I reverted back to user-supplied. For symbols,
we already have the add_flags, so I added SYMFILE_USER_SUPPLIED instead
of a new boolean.
>
>> @@ -2490,11 +2490,14 @@ attach_command_post_wait (char *args, int from_tty, int async_exec)
>> inferior = current_inferior ();
>> inferior->control.stop_soon = NO_STOP_QUIETLY;
>>
>> - /* If no exec file is yet known, try to determine it from the
>> - process itself. */
>> - if (get_exec_file (0) == NULL)
>> - exec_file_locate_attach (ptid_get_pid (inferior_ptid), from_tty);
>> - else
>> + /* Attempt to open the file that was executed to create this
>> + inferior. If the user has explicitly specified executable
>> + and/or symbol files then warn the user if their choices do
>> + not match. Otherwise, set exec_file and symfile_objfile to
>> + the new file. */
>> + exec_file_locate_attach (ptid_get_pid (inferior_ptid), from_tty);
>> +
>> + if (exec_file_is_user_supplied)
>> {
>> reopen_exec_file ();
>> reread_symbols ();
>
> It seems to me that we should be able to move these reopen/reread
> calls inside exec_file_locate_attach.
I did this too.
What do you think of the version below?
I also tweaked the warnings a bit, to explicitly say "mismatch".
This would still need docs/NEWS changes, and a test would be good too.
-----------------------------------------------------------------------
Summary of changes:
gdb/corefile.c | 2 +-
gdb/exec.c | 94 +++++++++++++++++++++++++++++++-----------------------
gdb/exec.h | 4 +-
gdb/gdbcore.h | 25 ++++++++++----
gdb/infcmd.c | 8 +----
gdb/inferior.c | 9 ++---
gdb/infrun.c | 2 +-
gdb/main.c | 56 +++++++++++++++++++++-----------
gdb/progspace.c | 5 ++-
gdb/progspace.h | 24 +++++++-------
gdb/remote.c | 2 +-
gdb/solib-svr4.c | 2 +-
gdb/symfile.c | 26 +++++++++------
gdb/symfile.h | 9 ++++-
14 files changed, 156 insertions(+), 112 deletions(-)
First 500 lines of diff:
diff --git a/gdb/corefile.c b/gdb/corefile.c
index 5246f71..5d861de 100644
--- a/gdb/corefile.c
+++ b/gdb/corefile.c
@@ -146,7 +146,7 @@ reopen_exec_file (void)
res = stat (filename, &st);
if (exec_bfd_mtime && exec_bfd_mtime != st.st_mtime)
- exec_file_attach (filename, 0);
+ exec_file_attach (exec_file_was_user_supplied, filename, 0);
else
/* If we accessed the file since last opening it, close it now;
this stops GDB from holding the executable open after it
diff --git a/gdb/exec.c b/gdb/exec.c
index 4d0e646..4ec321b 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -78,7 +78,7 @@ static void
exec_open (const char *args, int from_tty)
{
target_preopen (from_tty);
- exec_file_attach (args, from_tty);
+ exec_file_attach (1, args, from_tty);
}
/* Close and clear exec_bfd. If we end up with no target sections to
@@ -102,7 +102,7 @@ exec_close (void)
xfree (exec_filename);
exec_filename = NULL;
- exec_file_is_user_supplied = 0;
+ exec_file_was_user_supplied = 0;
}
}
@@ -139,54 +139,67 @@ exec_file_clear (int from_tty)
/* See gdbcore.h. */
void
-exec_file_locate_attach (int pid, int from_tty)
+exec_file_and_symbols_resync (struct inferior *inf, int from_tty)
{
char *exec_file, *full_exec_path = NULL;
+ struct cleanup *old_chain = save_current_program_space ();
- /* Try to determine a filename from the process itself. */
- exec_file = target_pid_to_exec_file (pid);
- if (exec_file == NULL)
- return;
+ /* Switch over temporarily, while reading executable and
+ symbols. */
+ set_current_program_space (inf->pspace);
- /* If gdb_sysroot is not empty and the discovered filename
- is absolute then prefix the filename with gdb_sysroot. */
- if (*gdb_sysroot != '\0' && IS_ABSOLUTE_PATH (exec_file))
- full_exec_path = exec_file_find (exec_file, NULL);
-
- if (full_exec_path == NULL)
+ /* Try to determine a filename from the process itself. */
+ exec_file = target_pid_to_exec_file (inf->pid);
+ if (exec_file != NULL)
{
- /* It's possible we don't have a full path, but rather just a
- filename. Some targets, such as HP-UX, don't provide the
- full path, sigh.
-
- Attempt to qualify the filename against the source path.
- (If that fails, we'll just fall back on the original
- filename. Not much more we can do...) */
- if (!source_full_path_of (exec_file, &full_exec_path))
- full_exec_path = xstrdup (exec_file);
+ /* If gdb_sysroot is not empty and the discovered filename
+ is absolute then prefix the filename with gdb_sysroot. */
+ if (*gdb_sysroot != '\0' && IS_ABSOLUTE_PATH (exec_file))
+ full_exec_path = exec_file_find (exec_file, NULL);
+
+ if (full_exec_path == NULL)
+ {
+ /* It's possible we don't have a full path, but rather just a
+ filename. Some targets, such as HP-UX, don't provide the
+ full path, sigh.
+
+ Attempt to qualify the filename against the source path.
+ (If that fails, we'll just fall back on the original
+ filename. Not much more we can do...) */
+ if (!source_full_path_of (exec_file, &full_exec_path))
+ full_exec_path = xstrdup (exec_file);
+ }
}
- if (exec_file_is_user_supplied)
+ if (exec_filename != NULL && exec_file_was_user_supplied)
{
- if (strcmp (full_exec_path, exec_filename) != 0)
- warning (_("Process %d has executable file %s,"
- " but executable file is currently set to %s"),
- pid, full_exec_path, exec_filename);
+ if (full_exec_path != NULL && strcmp (full_exec_path, exec_filename) != 0)
+ warning (_("Detected exec-file mismatch on %s. Running %s; Loaded %s"),
+ target_pid_to_str (pid_to_ptid (inf->pid)),
+ full_exec_path, exec_filename);
+ reopen_exec_file ();
}
- else
- exec_file_attach (full_exec_path, from_tty);
+ else if (full_exec_path != NULL)
+ exec_file_attach (0, full_exec_path, from_tty);
- if (symfile_objfile_is_user_supplied)
+ if (symfile_objfile != NULL && symfile_objfile_was_user_supplied)
{
const char *symbol_filename = objfile_filename (symfile_objfile);
- if (strcmp (full_exec_path, symbol_filename) != 0)
- warning (_("Process %d has symbol file %s,"
- " but symbol file is currently set to %s"),
- pid, full_exec_path, symbol_filename);
+ if (full_exec_path != NULL
+ && strcmp (full_exec_path, symbol_filename) != 0)
+ warning (_("Detected symbol-file mismatch on %s. Running %s; Loaded %s"),
+ target_pid_to_str (pid_to_ptid (inf->pid)),
+ full_exec_path, symbol_filename);
}
- else
- symbol_file_add_main (full_exec_path, from_tty);
+ else if (full_exec_path != NULL)
+ symbol_file_add_main (0, full_exec_path, from_tty);
+
+ /* Re-read symbol files that were modified since we last loaded
+ them. */
+ reread_symbols ();
+
+ do_cleanups (old_chain);
}
/* Set FILENAME as the new exec file.
@@ -207,7 +220,7 @@ exec_file_locate_attach (int pid, int from_tty)
we're supplying the exec pathname late for good reason.) */
void
-exec_file_attach (const char *filename, int from_tty)
+exec_file_attach (int user_supplied, const char *filename, int from_tty)
{
struct cleanup *cleanups;
@@ -294,6 +307,8 @@ exec_file_attach (const char *filename, int from_tty)
do_cleanups (cleanups);
+ exec_file_was_user_supplied = user_supplied;
+
bfd_cache_close_all ();
observer_notify_executable_changed ();
}
@@ -335,13 +350,12 @@ exec_file_command (char *args, int from_tty)
filename = tilde_expand (*argv);
make_cleanup (xfree, filename);
- exec_file_attach (filename, from_tty);
- exec_file_is_user_supplied = 1;
+ exec_file_attach (1, filename, from_tty);
do_cleanups (cleanups);
}
else
- exec_file_attach (NULL, from_tty);
+ exec_file_attach (1, NULL, from_tty);
}
/* Set both the exec file and the symbol file, in one command.
diff --git a/gdb/exec.h b/gdb/exec.h
index d984e97..aef2926 100644
--- a/gdb/exec.h
+++ b/gdb/exec.h
@@ -32,8 +32,8 @@ struct objfile;
#define exec_bfd current_program_space->ebfd
#define exec_bfd_mtime current_program_space->ebfd_mtime
#define exec_filename current_program_space->pspace_exec_filename
-#define exec_file_is_user_supplied \
- current_program_space->pspace_exec_file_is_user_supplied
+#define exec_file_was_user_supplied \
+ current_program_space->pspace_exec_file_was_user_supplied
/* Builds a section table, given args BFD, SECTABLE_PTR, SECEND_PTR.
Returns 0 if OK, 1 on error. */
diff --git a/gdb/gdbcore.h b/gdb/gdbcore.h
index 0c08b37..f34ee77 100644
--- a/gdb/gdbcore.h
+++ b/gdb/gdbcore.h
@@ -146,14 +146,23 @@ extern int write_files;
extern void core_file_command (char *filename, int from_tty);
-extern void exec_file_attach (const char *filename, int from_tty);
-
-/* If the filename of the main executable is unknown, attempt to
- determine it. If a filename is determined, proceed as though
- it was just specified with the "file" command. Do nothing if
- the filename of the main executable is already known. */
-
-extern void exec_file_locate_attach (int pid, int from_tty);
+extern void exec_file_attach (int user_supplied, const char *filename,
+ int from_tty);
+
+/* Resync executable and symbols. Fetch the filename of the main
+ executable based on what the target is running. If a filename can
+ be determined, and the current exec file loaded was not previously
+ user supplied, then load the discovered filename as exec file. If
+ the executable loaded had been user supplied (with e.g., the "file"
+ command), issue a warning if there's a mismatch, and reload the
+ previously user-specified executable (in case the program was
+ recompiled since the last time we loaded it). Likewise, if the
+ currenly load main symbol file was not user supplied, load the
+ discovered filename as symbol file; otherwise, if there's a
+ mismatch, warn. End by reading all symbol files that have been
+ modified since the last time we loaded them. */
+
+extern void exec_file_and_symbols_resync (struct inferior *inf, int from_tty);
extern void exec_file_clear (int from_tty);
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 1f9d94a..b6d9474 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -2497,13 +2497,7 @@ attach_command_post_wait (char *args, int from_tty, int async_exec)
and/or symbol files then warn the user if their choices do
not match. Otherwise, set exec_file and symfile_objfile to
the new file. */
- exec_file_locate_attach (ptid_get_pid (inferior_ptid), from_tty);
-
- if (exec_file_is_user_supplied)
- {
- reopen_exec_file ();
- reread_symbols ();
- }
+ exec_file_and_symbols_resync (inferior, from_tty);
/* Take any necessary post-attaching actions for this platform. */
target_post_attach (ptid_get_pid (inferior_ptid));
diff --git a/gdb/inferior.c b/gdb/inferior.c
index 118aca6..30d0f25 100644
--- a/gdb/inferior.c
+++ b/gdb/inferior.c
@@ -859,16 +859,13 @@ add_inferior_command (char *args, int from_tty)
if (exec != NULL)
{
/* Switch over temporarily, while reading executable and
- symbols.q. */
+ symbols. */
set_current_program_space (inf->pspace);
set_current_inferior (inf);
switch_to_thread (null_ptid);
- exec_file_attach (exec, from_tty);
- exec_file_is_user_supplied = 1;
-
- symbol_file_add_main (exec, from_tty);
- symfile_objfile_is_user_supplied = 1;
+ exec_file_attach (1, exec, from_tty);
+ symbol_file_add_main (SYMFILE_USER_SPECIFIED, exec, from_tty);
}
}
diff --git a/gdb/infrun.c b/gdb/infrun.c
index a695f2e..44d2e06 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -1211,7 +1211,7 @@ follow_exec (ptid_t ptid, char *execd_pathname)
gdb_assert (current_program_space == inf->pspace);
/* That a.out is now the one to use. */
- exec_file_attach (execd_pathname, 0);
+ exec_file_attach (0, execd_pathname, 0);
/* SYMFILE_DEFER_BP_RESET is used as the proper displacement for PIE
(Position Independent Executable) main symbol file will get applied by
diff --git a/gdb/main.c b/gdb/main.c
index 2c63e80..e7f5086 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -405,6 +405,29 @@ catch_command_errors_const (catch_command_errors_const_ftype *command,
return 1;
}
+/* Like catch_command_errors, but specifically for symbol/exec load
+ routines. */
+
+typedef void (catch_exec_or_symbol_errors_ftype) (int, const char *, int);
+
+static int
+catch_exec_or_symbol_errors (catch_exec_or_symbol_errors_ftype *func,
+ int arg, const char *filename, int from_tty)
+{
+ TRY
+ {
+ func (arg, filename, from_tty);
+ }
+ CATCH (e, RETURN_MASK_ALL)
+ {
+ exception_print (gdb_stderr, e);
+ return 0;
+ }
+ END_CATCH
+
+ return 1;
+}
+
/* Type of this option. */
enum cmdarg_kind
{
@@ -1050,28 +1073,23 @@ captured_main (void *data)
{
/* The exec file and the symbol-file are the same. If we can't
open it, better only print one error message.
- catch_command_errors returns non-zero on success! */
- if (catch_command_errors_const (exec_file_attach, execarg,
- !batch_flag))
- {
- exec_file_is_user_supplied = 1;
-
- if (catch_command_errors_const (symbol_file_add_main, symarg,
- !batch_flag))
- symfile_objfile_is_user_supplied = 1;
- }
+ catch_exec_or_symbol_errors returns non-zero on success. */
+ if (catch_exec_or_symbol_errors (exec_file_attach,
+ 1, execarg, !batch_flag))
+ catch_exec_or_symbol_errors (symbol_file_add_main,
+ SYMFILE_USER_SPECIFIED,
+ symarg, !batch_flag);
}
else
{
- if (execarg != NULL
- && catch_command_errors_const (exec_file_attach, execarg,
- !batch_flag))
- exec_file_is_user_supplied = 1;
-
- if (symarg != NULL
- && catch_command_errors_const (symbol_file_add_main, symarg,
- !batch_flag))
- symfile_objfile_is_user_supplied = 1;
+ if (execarg != NULL)
+ catch_exec_or_symbol_errors (exec_file_attach, 1,
+ execarg, !batch_flag);
+
+ if (symarg != NULL)
+ catch_exec_or_symbol_errors (symbol_file_add_main,
+ SYMFILE_USER_SPECIFIED,
+ symarg, !batch_flag);
}
if (corearg && pidarg)
diff --git a/gdb/progspace.c b/gdb/progspace.c
index ea2f8ec..1b3f689 100644
--- a/gdb/progspace.c
+++ b/gdb/progspace.c
@@ -182,10 +182,11 @@ clone_program_space (struct program_space *dest, struct program_space *src)
set_current_program_space (dest);
if (src->pspace_exec_filename != NULL)
- exec_file_attach (src->pspace_exec_filename, 0);
+ exec_file_attach (1, src->pspace_exec_filename, 0);
if (src->symfile_object_file != NULL)
- symbol_file_add_main (objfile_name (src->symfile_object_file), 0);
+ symbol_file_add_main (SYMFILE_USER_SPECIFIED,
+ objfile_name (src->symfile_object_file), 0);
do_cleanups (old_chain);
return dest;
diff --git a/gdb/progspace.h b/gdb/progspace.h
index 4761781..01fd9a3 100644
--- a/gdb/progspace.h
+++ b/gdb/progspace.h
@@ -155,10 +155,10 @@ struct program_space
char *pspace_exec_filename;
/* Nonzero if pspace_exec_filename was supplied by the user,
- either at startup (on the command-line) or via the "file"
- or "add-inferior -exec" commands. Zero if
- pspace_exec_filename is unset or was discovered by GDB. */
- int pspace_exec_file_is_user_supplied;
+ either at startup (on the command-line) or via the "file" or
+ "add-inferior -exec" commands. Zero if pspace_exec_filename is
+ unset or was discovered by GDB. */
+ int pspace_exec_file_was_user_supplied;
/* The address space attached to this program space. More than one
program space may be bound to the same address space. In the
@@ -189,11 +189,11 @@ struct program_space
(e.g. the argument to the "symbol-file" or "file" command). */
struct objfile *symfile_object_file;
- /* Nonzero if symfile_object_file was supplied by the user,
- either at startup (on the command-line) or via the "file",
- "symbol-file" or "add-inferior -exec" commands. Zero if
- symfile_object_file is unset or was discovered by GDB. */
- int symfile_object_file_is_user_supplied;
+ /* Nonzero if symfile_object_file is set and was discovered by
+ GDB. Zero if symfile_object_file is not set or was supplied
+ by the user, either at startup (on the command-line) or via the
+ "file" or "add-inferior -exec" commands. */
+ int symfile_object_file_was_user_supplied;
/* All known objfiles are kept in a linked list. This points to
the head of this list. */
@@ -227,10 +227,10 @@ struct program_space
#define symfile_objfile current_program_space->symfile_object_file
-/* See program_space->symfile_object_file_is_user_supplied. */
+/* See program_space->symfile_object_file_was_user_supplied. */
-#define symfile_objfile_is_user_supplied \
- current_program_space->symfile_object_file_is_user_supplied
+#define symfile_objfile_was_user_supplied \
+ current_program_space->symfile_object_file_was_user_supplied
/* All known objfiles are kept in a linked list. This points to the
root of this list. */
diff --git a/gdb/remote.c b/gdb/remote.c
index 8ff71c2..0aea212 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -1644,7 +1644,7 @@ remote_add_inferior (int fake_pid_p, int pid, int attached,
not match. Otherwise, set exec_file and symfile_objfile to
the new file. */
if (try_open_exec)
- exec_file_locate_attach (pid, 1);
+ exec_file_and_symbols_resync (inf, 1);
return inf;
}
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 8cc7cc1..f15ea02 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -1073,7 +1073,7 @@ open_symbol_file_object (void *from_ttyp)
}
/* Have a pathname: read the symbol file. */
- symbol_file_add_main (filename, from_tty);
+ symbol_file_add_main (0, filename, from_tty);
do_cleanups (cleanups);
return 1;
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 9a1785d..a943ec0 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -85,7 +85,8 @@ int readnow_symbol_files; /* Read full symbols immediately. */
static void load_command (char *, int);
-static void symbol_file_add_main_1 (const char *args, int from_tty, int flags);
+static void symbol_file_add_main_1 (int add_flags, const char *args,
+ int from_tty, int flags);
static void add_symbol_file_command (char *, int);
@@ -1306,16 +1307,17 @@ symbol_file_add (const char *name, int add_flags,
command itself. */
void
-symbol_file_add_main (const char *args, int from_tty)
+symbol_file_add_main (int add_flags, const char *args, int from_tty)
{
- symbol_file_add_main_1 (args, from_tty, 0);
+ symbol_file_add_main_1 (add_flags, args, from_tty, 0);
}
static void
-symbol_file_add_main_1 (const char *args, int from_tty, int flags)
+symbol_file_add_main_1 (int add_flags, const char *args, int from_tty,
+ int flags)
{
- const int add_flags = (current_inferior ()->symfile_flags
- | SYMFILE_MAINLINE | (from_tty ? SYMFILE_VERBOSE : 0));
+ add_flags |= (current_inferior ()->symfile_flags
+ | SYMFILE_MAINLINE | (from_tty ? SYMFILE_VERBOSE : 0));
symbol_file_add (args, add_flags, NULL, flags);
@@ -1325,6 +1327,9 @@ symbol_file_add_main_1 (const char *args, int from_tty, int flags)
if ((flags & SYMFILE_NO_READ) == 0)
set_initial_language ();
+
+ symfile_objfile_was_user_supplied
+ = (add_flags & SYMFILE_USER_SPECIFIED) != 0;
}
void
@@ -1348,7 +1353,7 @@ symbol_file_clear (int from_tty)
if (from_tty)
printf_unfiltered (_("No symbol file now.\n"));
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [SCM] jankratochvil/gdbserverbuildid: sticky
@ 2015-08-15 10:01 jkratoch
0 siblings, 0 replies; 8+ messages in thread
From: jkratoch @ 2015-08-15 10:01 UTC (permalink / raw)
To: archer-commits
The branch, jankratochvil/gdbserverbuildid has been updated
discards d2ef8af905e3c800284385c8690da040302328ae (commit)
discards 8f5e9db1cf58809678aab42fa58c37f03029e630 (commit)
discards e53bb70e546bd8c522b699f7dd1c39795534eade (commit)
discards e2a7020361598cf9b3e6fa54d7d0bcea78e9fae6 (commit)
discards 6a4c1b31f5bf5e796336de40689bbd4bfc047a5e (commit)
discards 7364e72a472c8f95977aec0b8804cf42dcd86eb2 (commit)
discards ad2f3404e4a1666cf691566f41c33e1adb45817d (commit)
discards d9eb82ccf176f569cf9b1bea4d057372abd8be7b (commit)
discards 1da182968922bded291ef015b2e9ae098021de43 (commit)
discards 3011db9cf05c1553bb7e227687190c0f26b32c58 (commit)
discards 3ea6568826aaa1dc73f2ed9cea77dbd763e0633e (commit)
discards cd1049766a086d465a13f60db4b1b1ba2ff0e2c2 (commit)
discards 3e4d2a0385640ed6c9a5edd0a4a07ec1483ed6de (commit)
discards 6545df5ecd569693f1c201206a2501d249bdc6a8 (commit)
discards a6d3a59c67567e73474c5944ee058480bb759a89 (commit)
discards fc9bc2b2606abb979bf3aae46464a86472158e71 (commit)
discards e5b168bf9555d5f4d4f870c9db4d71d41ab2f35d (commit)
discards 83b9bd71abd6eebb7f096e05e6d28cd2209765a1 (commit)
discards ae70d8fa734033d1e197a8ce21bc82c393e9bfdd (commit)
discards 8f6abda46262ef44b8f448be3643ea502288f3ee (commit)
discards 3eaf8395d993ffd039863c5d61f77c59b27cdd4b (commit)
discards 629f7538f1c705deefe237b87153597e8bf6b4b1 (commit)
discards fb1352c863ab57bef975d9826efb4de0a7a49e63 (commit)
discards e655914ce35a288d78848a6126b911e874d0f23e (commit)
discards 02f3bfabeb4b3d8aefc23c5e0a7e9229c2da0c1a (commit)
discards 90721dfec76d65d29ac5fbf49c5718bd850abe41 (commit)
discards ce4a423657022eb9dca3552b287e8db3a8bae5de (commit)
discards 208dacff86eca30c3f5990905f66f18e19ffbb57 (commit)
discards b5d50914f4202b1f15df5e6c1b4868726dc5f43c (commit)
discards bce282542cdcc386678a05f66a3aae1cac40f39d (commit)
discards 88e1a37952d639ba05a92032e3a0d94ab466bed4 (commit)
discards f8688948e2ef7e8ccc1899ab34a824d9904ef469 (commit)
discards 257ed7ddfe7b6eeccc1782ed3b6c5a8e1a10e951 (commit)
discards 7a460e688c25393f8bde0d9ee51be0475e40b169 (commit)
via 7a947a6bd868ee8559dca4a2b16b894ea654b8fd (commit)
via ad89a2f824135c905c231a78d9627e6589bb4a95 (commit)
via 4874f3b58bb2c74b62ec7227fbe41386fb5d8007 (commit)
via 5353e034a77740ff0ef0ee48eb9d0f7af01e8307 (commit)
via 82e9f636c521d9ecdf804a9072170177e8e793b3 (commit)
via cd79c4492a000a36649464257cea46def250391c (commit)
via 08ad08f1e4305221a4513ec87e1d5d085c3d4fab (commit)
via 177660d6a8d4f4ba1660fc61b49da42cdf96eb9e (commit)
via 8db972fd3127ea419267b3b235cd7b00b9fe875d (commit)
via a3b70f44851d42fc06a9f94b01ab687440ea19c2 (commit)
via c4c90a0f7bc8317cb962c499ede1208790a9253a (commit)
via c4ef17e38205ff1559a58e3bdd5f6ef92ecda89b (commit)
via 0d00d3a8d93e6ac23d29c7c8e53f1dfc1666a822 (commit)
via 4600db9a5cc528a655a1ebe92d477209d7146800 (commit)
via c1d8b72d24a6123eb8648bdbc1b2e3a56e282bc6 (commit)
via 87d3c70eb6acd1584f17ff27dbfa7853fe0ea9ed (commit)
via 2fce2213eba7e5446979a0ce2d032b1acb621aaf (commit)
via 12f3de0ea0fb4c5d60f5fad73c6f054bd1e0fea1 (commit)
via 8db0b61178445252d6c43384784728b71b7f3f05 (commit)
via e600bf60a682090eb325052245a7c79aba73ff77 (commit)
via 99c41f79be7c1437c8499d632fd13e8ae7d36c32 (commit)
via 06214010ff8650436a4021a8536af52a19e4c748 (commit)
via 418b022857bb6be73630d795ff6ccb818145a566 (commit)
via 79df217f6235b3fc200668fd39dfe38df1dafc44 (commit)
via 47c49eb97dcc9ff751e977d5a57f48e27333c59d (commit)
via 4ab6b65563fb705f0dc5a45396e429995f6dd25c (commit)
via e67b73dbb7068902c37ef2e08caf3e0f70421832 (commit)
via 73ed2df5ca2a88300086c72adf5cf88961c3e0dd (commit)
via e9100478ca7b48f167372bc4c0578df868cc5302 (commit)
via d68335080a1989970d4a5dfcd16d32954f7b520d (commit)
via 47498547bc0aa3debec59ad458a18a5612bc9604 (commit)
via 89fa75c615cbd3ebb1e3c804ba7f51d2682d5ca6 (commit)
via 6d7d4da8f7097b4dd84029ed20ca9272622a64f2 (commit)
via cfeca82d7f630591c93f1a47b84742294aa84a57 (commit)
via 604b263620af66e3bf881f146e329b4de06104a5 (commit)
via 6ff0ba5f7b8a2b10642bbb233a32043595c55670 (commit)
via b56ccc202ab674998baf52a710d736702734f9ab (commit)
via a057aa3c457ba38ca25ff1ed13a30c629bb0f259 (commit)
via ebdad8fc7fd12b52a2dd14cdca735728b2f7ebc7 (commit)
via 9ca98f927800a8446555e3f64cc3437c08ce266b (commit)
via 6613eb10d10ee79ef09bf4dfe696586f479c8d02 (commit)
via c0fe2ae7064c4f927034aca87913bc28920721d9 (commit)
via a738da3abe2bc02d70521086cf1d0e23565b8fbe (commit)
via f8edc4ff051b4e29997681cb3bc9078d98f4d457 (commit)
via 9b57267f4ffa4f8a168f89630a4b68fb51a419de (commit)
via 92019596ba7df7156ac634abf3ae82738dc5ba55 (commit)
via 444c1ed8915961384af694249701fa7896e11da8 (commit)
via bc7c9fab612d4d33f7fe5d17eef4f5bd5cdc4144 (commit)
via 52bbc560524ec3691203eccd05207d13913a1e35 (commit)
via 3207396b9532f179bad24a9fb9a83253f3f5144d (commit)
via 67994074671a31e3d2fb78f6036f38095211ac49 (commit)
from d2ef8af905e3c800284385c8690da040302328ae (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 7a947a6bd868ee8559dca4a2b16b894ea654b8fd
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:20 2015 +0200
sticky
Message-Id: <1433754079-10395-1-git-send-email-gbenson@redhat.com>
Philippe Waroquiers wrote:
> On Fri, 2015-06-05 at 12:22 +0100, Gary Benson wrote:
> > Built and regtested on RHEL6.6 x86_64.
> I tested with the last SVN version of the Valgrind gdbserver (that
> supports qXfer:exec-file:read+).
>
> The patch introduces a regression:
> with the patch, GDB does not anymore automatically load the
> exec-file.
>
> I bypassed this problem by ignoring fake_pid_p in remote.c:
> --- a/gdb/remote.c
> +++ b/gdb/remote.c
> @@ -1624,9 +1624,13 @@ remote_add_inferior (int fake_pid_p, int pid, int
> attached,
> inf->attach_flag = attached;
> inf->fake_pid_p = fake_pid_p;
>
> - /* If no main executable is currently open then attempt to
> - open the file that was executed to create this inferior. */
> - if (try_open_exec && get_exec_file (0) == NULL)
> + /* Attempt to open the file that was executed to create this
> + inferior. If the user has explicitly specified executable
> + and/or symbol files then warn the user if their choices do
> + not match. Otherwise, set exec_file and symfile_objfile to
> + the new file. */
> + printf("fake_pid_p %d\n", fake_pid_p);
> + if (try_open_exec)// && !fake_pid_p)
> exec_file_locate_attach (pid, 1);
>
> Effectively, the printf shows that with Valgrind gdbsrv,
> fake_pid_p value is 1.
>
> When ignoring fake_pid_p, GDB can properly attach
> to different Valgrind gdbsrv, and changes of executable
> as expected.
Ah, it seems I mailed a bad patch, my apologies! I was working on
two fixes that touched the same line, and it looks like I rebased
them in the wrong order.
This updated patch has been created against the latest gdb/master
(80fb91378c91a8239817a5ab2b1c3e346109db25). Could you please try
your tests again?
Thanks,
Gary
---
On attach, GDB will only attempt to determine the main executable's
filename if one is not already set. This causes problems if you
attach to one process and then attach to another: GDB will not attempt
to discover the main executable on the second attach. If the two
processes have different main executable files then the symbols will
now be wrong. This is PR gdb/17626.
In GDB some filenames are supplied by the user (e.g. using the "file"
or "symbol-file" commands) and some are determined by GDB (e.g. while
processing an "attach" command). This commit updates GDB to track
which filenames were supplied by the user. When GDB might attempt to
determine an executable filename and one is already set, filenames
determined by GDB may be overridden but user-supplied filenames will
not.
gdb/ChangeLog:
PR gdb/17626
* progspace.h (struct program_space)
<pspace_exec_file_is_user_supplied>: New field.
<symfile_object_file_is_user_supplied>: Likewise.
(symfile_objfile_is_user_supplied): New macro.
* exec.h (exec_file_is_user_supplied): Likewise.
* exec.c (exec_close): Clear exec_file_is_user_supplied.
(exec_file_locate_attach): Remove get_exec_file check.
Do not replace user-supplied executable or symbol files.
Warn if user-supplied executable or symbol files do not
match discovered file.
(exec_file_command): Set exec_file_is_user_supplied.
* symfile.c (symbol_file_clear): Clear
symfile_objfile_is_user_supplied.
(symbol_file_command): Set symfile_objfile_is_user_supplied.
* inferior.c (add_inferior_command): Set
exec_file_is_user_supplied and symfile_objfile_is_user_supplied.
* main.c (captured_main): Likewise.
* infcmd.c (attach_command_post_wait): Always call
exec_file_locate_attach. Only call reopen_exec_file and
reread_symbols if exec_file_is_user_supplied.
* remote.c (remote_add_inferior): Remove get_exec_file check
around exec_file_locate_attach.
commit ad89a2f824135c905c231a78d9627e6589bb4a95
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:19 2015 +0200
mainbuildid
commit 4874f3b58bb2c74b62ec7227fbe41386fb5d8007
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:19 2015 +0200
hexallocate
commit 5353e034a77740ff0ef0ee48eb9d0f7af01e8307
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:19 2015 +0200
locatetest
commit 82e9f636c521d9ecdf804a9072170177e8e793b3
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:19 2015 +0200
Tests for validate symbol file using build-id
New testcase.
gdb/testsuite/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Tests for validate symbol file using build-id.
* gdb.base/solib-mismatch-lib.c: New file.
* gdb.base/solib-mismatch-libmod.c: New file.
* gdb.base/solib-mismatch.c: New file.
* gdb.base/solib-mismatch.exp: New file.
commit cd79c4492a000a36649464257cea46def250391c
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:18 2015 +0200
buildidwarn
commit 08ad08f1e4305221a4513ec87e1d5d085c3d4fab
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:18 2015 +0200
buildidsolibbfdopen
commit 177660d6a8d4f4ba1660fc61b49da42cdf96eb9e
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:18 2015 +0200
buildidverify
commit 8db972fd3127ea419267b3b235cd7b00b9fe875d
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:18 2015 +0200
buildidsolibsearch
commit a3b70f44851d42fc06a9f94b01ab687440ea19c2
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:18 2015 +0200
buildidtofile
commit c4c90a0f7bc8317cb962c499ede1208790a9253a
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:17 2015 +0200
buildidproto
commit c4ef17e38205ff1559a58e3bdd5f6ef92ecda89b
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:17 2015 +0200
buildidtobfd
commit 0d00d3a8d93e6ac23d29c7c8e53f1dfc1666a822
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:17 2015 +0200
buildidforcemove
commit 4600db9a5cc528a655a1ebe92d477209d7146800
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:17 2015 +0200
buildidfreefix
commit c1d8b72d24a6123eb8648bdbc1b2e3a56e282bc6
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:16 2015 +0200
openpsymfile
commit 87d3c70eb6acd1584f17ff27dbfa7853fe0ea9ed
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:16 2015 +0200
openpsolib
commit 2fce2213eba7e5446979a0ce2d032b1acb621aaf
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:16 2015 +0200
openp
commit 12f3de0ea0fb4c5d60f5fad73c6f054bd1e0fea1
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:16 2015 +0200
filelib
commit 8db0b61178445252d6c43384784728b71b7f3f05
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:15 2015 +0200
openfromtargetdoclose
commit e600bf60a682090eb325052245a7c79aba73ff77
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:15 2015 +0200
openfromtargetfd
commit 99c41f79be7c1437c8499d632fd13e8ae7d36c32
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:15 2015 +0200
openfromtarget
commit 06214010ff8650436a4021a8536af52a19e4c748
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:14 2015 +0200
openpnullpathname
commit 418b022857bb6be73630d795ff6ccb818145a566
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:14 2015 +0200
openpmode
commit 79df217f6235b3fc200668fd39dfe38df1dafc44
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:14 2015 +0200
openppath
commit 47c49eb97dcc9ff751e977d5a57f48e27333c59d
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:13 2015 +0200
openpenum
commit 4ab6b65563fb705f0dc5a45396e429995f6dd25c
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:13 2015 +0200
sysrootdefault
commit e67b73dbb7068902c37ef2e08caf3e0f70421832
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:13 2015 +0200
sysrootdelim
commit 73ed2df5ca2a88300086c72adf5cf88961c3e0dd
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:12 2015 +0200
sysrootconst
commit e9100478ca7b48f167372bc4c0578df868cc5302
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Aug 15 11:38:53 2015 +0200
Validate symbol file using build-id
Consumer part of the "build-id" attribute.
gdb/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
Validate symbol file using build-id.
* NEWS (Changes since GDB 7.10): Add 'set validate-build-id'
and 'show validate-build-id'. Add build-id attribute.
* solib-darwin.c (_initialize_darwin_solib): Assign validate value.
* solib-dsbt.c (_initialize_dsbt_solib): Ditto.
* solib-frv.c (_initialize_frv_solib): Ditto.
* solib-spu.c (set_spu_solib_ops): Ditto.
* solib-svr4.c: Include rsp-low.h.
(NOTE_GNU_BUILD_ID_NAME): New define.
(svr4_validate): New function.
(svr4_copy_library_list): Duplicate field build_id.
(library_list_start_library): Parse 'build-id' attribute.
(svr4_library_attributes): Add 'build-id' attribute.
(_initialize_svr4_solib): Assign validate value.
* solib-target.c (solib.h): Include.
(_initialize_solib_target): Assign validate value.
* solib.c (validate_build_id, show_validate_build_id): New.
(solib_map_sections): Use ops->validate.
(clear_so): Free build_id.
(default_solib_validate): New function.
(_initialize_solib): Add "validate-build-id".
* solib.h (default_solib_validate): New declaration.
* solist.h (struct so_list): New fields 'build_idsz' and 'build_id'.
(target_so_ops): New field 'validate'.
gdb/doc/ChangeLog
2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.texinfo (Files): Add 'set validate-build-id'
and 'show validate-build-id'.
commit d68335080a1989970d4a5dfcd16d32954f7b520d
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Aug 15 11:38:52 2015 +0200
gdbserver build-id attribute generator
Producer part of the new "build-id" XML attribute.
gdb/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
gdbserver build-id attribute generator.
* features/library-list-svr4.dtd (library-list-svr4): New
'build-id' attribute.
gdb/doc/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
gdbserver build-id attribute generator.
* gdb.texinfo (Library List Format for SVR4 Targets): Add
'build-id' in description, example, new attribute in dtd.
gdb/gdbserver/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
gdbserver build-id attribute generator.
* linux-low.c (linux-maps.h, search.h, rsp-low.h): Include.
(ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
(ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
(find_phdr): New.
(get_dynamic): Use find_pdhr to traverse program headers.
(struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
(compare_mapping_entry_range, struct find_memory_region_callback_data)
(read_build_id, find_memory_region_callback, lrfind_mapping_entry)
(get_hex_build_id): New.
(linux_qxfer_libraries_svr4): Add optional build-id attribute
to reply XML document.
commit 47498547bc0aa3debec59ad458a18a5612bc9604
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Aug 15 11:38:52 2015 +0200
Move linux_find_memory_regions_full & co.
This should be just a move with no changes.
gdb/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
Move linux_find_memory_regions_full & co.
* linux-tdep.c (linux-maps.h): Include.
(gdb_regex.h): Remove the include.
(enum filterflags, struct smaps_vmflags, read_mapping, decode_vmflags)
(mapping_is_anonymous_p, dump_mapping_p): Moved to common/linux-maps.c.
(linux_find_memory_region_ftype): Moved typedef to common/linux-maps.h.
(linux_find_memory_regions_full): Moved definition to
common/linux-maps.c.
* common/linux-maps.c: Include ctype.h, target/target-utils.h,
gdb_regex.h and target/target.h.
(struct smaps_vmflags, read_mapping, decode_vmflags)
(mapping_is_anonymous_p, dump_mapping_p): Move from linux-tdep.c.
(linux_find_memory_regions_full): Move from linux-tdep.c.
* common/linux-maps.h (read_mapping): New declaration.
(linux_find_memory_region_ftype, enum filterflags): Moved from
linux-tdep.c.
(linux_find_memory_regions_full): New declaration.
* target.c (target/target-utils.h): Include.
(read_alloc_pread_ftype): Moved typedef to target/target-utils.h.
(read_alloc, read_stralloc_func_ftype, read_stralloc): Moved
definitions to target/target-utils.c.
* target.h (target_fileio_read_stralloc): Move it to target/target.h.
* target/target-utils.c (read_alloc, read_stralloc): Move definitions
from target.c.
* target/target-utils.h (read_alloc_pread_ftype): New typedef.
(read_alloc): New declaration.
(read_stralloc_func_ftype): New typedef.
(read_stralloc): New declaration.
* target/target.h (target_fileio_read_stralloc): Move it from target.h.
gdb/gdbserver/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
* target.c: Include target/target-utils.h and fcntl.h.
(target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
(target_fileio_read_stralloc): New functions.
commit 89fa75c615cbd3ebb1e3c804ba7f51d2682d5ca6
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Aug 15 11:38:52 2015 +0200
Prepare linux_find_memory_regions_full & co. for move
Prepare code for move into gdb/common/.
gdb/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
Prepare linux_find_memory_regions_full & co. for move.
* linux-tdep.c (linux_find_memory_region_ftype): Comment.
(linux_find_memory_regions_full): Change signature and prepare
for moving to linux-maps.
(linux_find_memory_regions_data): Rename field 'obfd' to 'data'.
(linux_find_memory_regions_thunk): New.
(linux_find_memory_regions_thunk): Use 'data' field instead of 'obfd'.
(linux_find_memory_regions_gdb): New.
(linux_find_memory_regions): Rename argument 'obfd' to 'func_data'.
(linux_make_mappings_corefile_notes): Use
linux_find_memory_regions_gdb.
* target.c (read_alloc_pread_ftype): New typedef.
(target_fileio_read_alloc_1_pread): New function.
(read_alloc): Refactor from target_fileio_read_alloc_1.
(read_stralloc_func_ftype): New typedef.
(target_fileio_read_alloc_1): New implementation. Use read_alloc.
(read_stralloc): Refactored from target_fileio_read_stralloc.
(target_fileio_read_stralloc): New implementation, use read_stralloc.
commit 6d7d4da8f7097b4dd84029ed20ca9272622a64f2
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Aug 15 11:38:52 2015 +0200
Move gdb_regex* to common/
Later patches need regex support also in gdbserver.
gdb/ChangeLog
2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
* Makefile.in (HFILES_NO_SRCDIR): Change gdb_regex.h to
common/gdb_regex.h.
(COMMON_OBS): Add gdb_regex.o.
(gdb_regex.o): New.
* common/common.m4 (GDB_AC_COMMON): Add gdb_use_included_regex,
--without-included-regex and USE_INCLUDED_REGEX.
* common/gdb_regex.c: New file from utils.c functions.
* common/gdb_regex.h: Move it here from gdb_regex.h, update include
file wrapping define name.
* configure: Rebuilt.
* configure.ac (gdb_use_included_regex, --without-included-regex)
(USE_INCLUDED_REGEX): Move them to common/common.m4.
* gdb_regex.h: Move it to common/gdb_regex.h.
* utils.c: Remove include gdb_regex.h.
(do_regfree_cleanup, make_regfree_cleanup, get_regcomp_error)
(compile_rx_or_error): Move them to common/gdb_regex.c.
gdb/gdbserver/ChangeLog
2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
* Makefile.in (OBS): Add gdb_regex.o.
(gdb_regex.o): New.
* config.in: Rebuilt.
* configure: Rebuilt.
commit cfeca82d7f630591c93f1a47b84742294aa84a57
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Aug 15 11:38:51 2015 +0200
Create empty common/linux-maps.[ch] and common/target-utils.[ch]
Prepare new files for later move.
gdb/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
Create empty common/linux-maps.[ch] and common/target-utils.[ch].
* Makefile.in (ALL_TARGET_OBS): Add linux-maps.o.
(HFILES_NO_SRCDIR); Add common/linux-maps.h,
common/target-utils.h.
(COMMON_OBS): Add target-utils.o.
(linux-maps.o, target-utils.o): New.
* target/target-utils.c: New file.
* target/target-utils.h: New file.
* common/linux-maps.c: New file.
* common/linux-maps.h: New file.
* configure.tgt (aarch64*-*-linux*, alpha*-*-linux*)
(am33_2.0*-*-linux*, arm*-*-linux*, bfin-*-*linux*, cris*, frv-*-*)
(hppa*-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
(m68*-*-linux*, microblaze*-linux-*, microblaze*-*-linux*)
(mips*-*-linux*, nios2*-*-linux*, powerpc*-*-linux*, s390*-*-linux*)
(sh*-*-linux*, sparc-*-linux*, sparc64-*-linux*, tic6x-*-*linux)
(tilegx-*-linux*, x86_64-*-linux*, xtensa*-*-linux*): Add linux-maps.o
to gdb_target_obs.
gdb/gdbserver/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
Create empty common/linux-maps.[ch] and common/target-utils.[ch].
* Makefile.in (OBS): Add target-utils.o.
(linux-maps.o, target-utils.o): New.
* configure.srv (srv_linux_obj): Add linux-maps.o.
commit 604b263620af66e3bf881f146e329b4de06104a5
Author: Doug Evans <xdje42@gmail.com>
Date: Fri Aug 14 23:29:04 2015 -0700
perftest/utils.py (select_file): Kill any existing inferior before selecting a new file.
gdb/testsuite/ChangeLog:
* gdb.perf/lib/perftest/utils.py (select_file): Kill any existing
inferior before selecting a new file.
commit 6ff0ba5f7b8a2b10642bbb233a32043595c55670
Author: Doug Evans <xdje42@gmail.com>
Date: Fri Aug 14 21:45:54 2015 -0700
New /s modifier for the disassemble command.
The "source centric" /m option to the disassemble command is often
unhelpful, e.g., in the presence of optimized code.
This patch adds a /s modifier that is better.
For one, /m only prints instructions from the originating source file,
leaving out instructions from e.g., inlined functions from other files.
gdb/ChangeLog:
PR gdb/11833
* NEWS: Document new /s modifier for the disassemble command.
* cli/cli-cmds.c (disassemble_command): Add support for /s.
(_initialize_cli_cmds): Update online docs of disassemble command.
* disasm.c: #include "source.h".
(struct deprecated_dis_line_entry): Renamed from dis_line_entry.
All uses updated.
(dis_line_entry): New struct.
(hash_dis_line_entry, eq_dis_line_entry): New functions.
(allocate_dis_line_table): New functions.
(maybe_add_dis_line_entry, line_has_code_p): New functions.
(dump_insns): New arg end_pc. All callers updated.
(do_mixed_source_and_assembly_deprecated): Renamed from
do_mixed_source_and_assembly. All callers updated.
(do_mixed_source_and_assembly): New function.
(gdb_disassembly): Handle /s (DISASSEMBLY_SOURCE).
* disasm.h (DISASSEMBLY_SOURCE_DEPRECATED): Renamed from
DISASSEMBLY_SOURCE. All uses updated.
(DISASSEMBLY_SOURCE): New macro.
* mi/mi-cmd-disas.c (mi_cmd_disassemble): New modes 4,5.
gdb/doc/ChangeLog:
* gdb.texinfo (Machine Code): Update docs for mixed source/assembly
disassembly.
(GDB/MI Data Manipulation): Update docs for new disassembly modes.
gdb/testsuite/ChangeLog:
* gdb.mi/mi-disassemble.exp: Update.
* gdb.base/disasm-optim.S: New file.
* gdb.base/disasm-optim.c: New file.
* gdb.base/disasm-optim.h: New file.
* gdb.base/disasm-optim.exp: New file.
commit b56ccc202ab674998baf52a710d736702734f9ab
Author: Keith Seitz <keiths@redhat.com>
Date: Fri Aug 14 17:28:11 2015 -0700
Rename `typename' in d-exp.y to avoid C++ reserved word
A recent patch introduced a variable named `typename' into d-exp.y,
and one of the --enable-with-cxx build slaves consequently failed to compile
this. This patch simply adds an underscore into the name to avoid the
reserved word.
gdb/ChangeLog
* d-exp.y (PrimaryExpression : TypeExp '.' IdentifierExp): Rename
`typename' to `type_name' to avoid C++ reserved word.
commit a057aa3c457ba38ca25ff1ed13a30c629bb0f259
Author: GDB Administrator <gdbadmin@sourceware.org>
Date: Sat Aug 15 00:00:07 2015 +0000
Automatic date update in version.in
commit ebdad8fc7fd12b52a2dd14cdca735728b2f7ebc7
Author: Keith Seitz <keiths@redhat.com>
Date: Fri Aug 14 15:00:04 2015 -0700
Rename location accessor macro parameters to silence ARI
The locations patch I recently committed contains macro definitions
such as:
This causes an ARI error to be emitted by the server ("Do not use PTR, ISO C
90 implies `void *'"). While this ARI error is bogus in this context,
it is just easiest to squash the error completely by renaming the macro
parameters.
gdb/ChangeLog
* location.c (EL_TYPE, EL_LINESPEC, EL_PROBE, EL_ADDRESS)
(EL_EXPLICIT, EL_STRING): Change macro parameter to "P" to
silence ARI errors.
commit 9ca98f927800a8446555e3f64cc3437c08ce266b
Author: Keith Seitz <keiths@redhat.com>
Date: Fri Aug 14 14:54:37 2015 -0700
Add missing ChangeLog entry for previous commit.
commit 6613eb10d10ee79ef09bf4dfe696586f479c8d02
Author: Keith Seitz <keiths@redhat.com>
Date: Fri Aug 14 13:45:06 2015 -0700
mi_make_breakpoint: add "evaluated-by" option
For some time now, GDB has permitted target-side evaluation of
breakpoint conditions. On targets that support this feature, GDB
may output an "evaluated-by" field into the breakpoint reply.
This patch adds handling for this option, and outputs a default
pattern to optionally recognize (and ignore) this pattern in the
reply.
gdb/testsuite/ChangeLog
* lib/mi-support.exp (mi_make_breakpoint): Add option/handling for
"evaluated-by".
commit c0fe2ae7064c4f927034aca87913bc28920721d9
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date: Fri Aug 14 21:25:17 2015 +0200
Fix ARI warnings in d-exp.y
This fixes four ARI warnings found in d-exp.y.
This is comprised of three uses of the && or || at the end of a line, and one
use of sprintf.
gdb/ChangeLog
* d-exp.y (PrimaryExpression : TypeExp '.' IdentifierExp): Use
xstrprintf instead of malloc and sprintf.
(PrimaryExpression : IdentifierExp): Avoid operator at end of line.
(lex_one_token): Likewise.
commit a738da3abe2bc02d70521086cf1d0e23565b8fbe
Author: Matthew Fortune <matthew.fortune@imgtec.com>
Date: Thu Jun 11 10:37:31 2015 +0100
Add support for DT_MIPS_RLD_MAP_REL.
This tag allows debugging of MIPS position independent executables
and provides access to shared library information.
gdb/gdbserver/
* linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
gdb/
* solib-svr4.c (read_program_header): Add base_addr argument to
report the runtime address of the segment.
(find_program_interpreter): Update read_program_header call to pass
a NULL pointer for the new argument.
(scan_dyntag): Add ptr_addr argument to report the runtime address
of the tag payload.
(scan_dyntag_auxv): Likewise and use thew new base_addr argument of
read_program_header to get the base address of the dynamic segment.
(elf_locate_base): Update uses of scan_dyntag, scan_dyntag_auxv and
read_program_header.
(elf_locate_base): Scan for and handle DT_MIPS_RLD_MAP_REL.
commit f8edc4ff051b4e29997681cb3bc9078d98f4d457
Author: Matthew Fortune <matthew.fortune@imgtec.com>
Date: Fri Aug 14 13:07:23 2015 +0100
Add myself to gdb MAINTAINERS
gdb/
* MAINTAINERS (Write After Approval): Add Matthew Fortune.
commit 9b57267f4ffa4f8a168f89630a4b68fb51a419de
Author: Alan Modra <amodra@gmail.com>
Date: Wed Aug 12 19:07:26 2015 +0930
Revert "Fix encoding or OpenRisk1000 PC relative relocations."
This reverts commit dbac553d28887561e3f154654ec8e70195d89943.
PR ld/18759
* elf32-or1k.c: Revert 2015-08-11 change.
commit 92019596ba7df7156ac634abf3ae82738dc5ba55
Author: GDB Administrator <gdbadmin@sourceware.org>
Date: Fri Aug 14 00:00:08 2015 +0000
Automatic date update in version.in
commit 444c1ed8915961384af694249701fa7896e11da8
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date: Thu Aug 13 21:35:09 2015 +0200
[D] Move classification of symbols from the grammar to the lexer.
This makes it so that alternating '.' and identifier tokens are resolved to
symbols as early as possible, which should all the addition of D properties -
such as EXP.sizeof and EXP.typeof - without the shift/reduce conflicts that
would occur in the current parsing strategy.
gdb/ChangeLog
* d-exp.y (%union): Add voidval.
(%token): Add UNKNOWN_NAME as a token to represent an unclassified
name in the lexing stage.
(PostfixExpression): Move symbol completion handling in grammar here
from PrimaryExpression.
(PrimaryExpression): Move routines to handle resolving identifier
tokens in the grammar here from push_expression_name.
(IdentifierExp): Remove the handling of alternating '.' and identifier
tokens.
(TypeExp): Allow TypeExp to be wrapped in parenthesis in the grammar.
(BasicType): Remove C-style typename rules.
(d_type_from_name, d_module_from_name, push_variable)
(push_fieldnames, push_type_name, push_module_name)
(push_expression_name): Remove.
(lex_one_token): Rename from yylex. Replace pstate with par_state.
(token_and_value): New type.
(token_fifo, popping, name_obstack): New globals.
(classify_name): New function.
(classify_inner_name): Likewise.
(yylex): Likewise.
(d_parse): Initialize token_fifo, popping and name_obstack.
commit bc7c9fab612d4d33f7fe5d17eef4f5bd5cdc4144
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date: Thu Aug 13 20:34:15 2015 +0200
[D] Support looking up symbols in the current and imported modules.
In D, there is the notion of modules, and importing from one to the other,
whether it is a basic, selective or renamed import declaration.
module A;
import X;
void foo() {
import Y : bar;
}
If the compiler emits DW_TAG_imported_declaration at the appropriate locations,
then we can make use of what gdb stores in using_direct when performing
nonlocal symbol lookups.
gdb/ChangeLog
* Makefile.in (SFILES): Add d-namespace.c.
(COMMON_OBS): Add d-namespace.o.
* d-lang.c (d_language_defn): Use d_lookup_symbol_nonlocal as the
la_lookup_symbol_nonlocal callback function pointer.
* d-lang.h (d_lookup_symbol_nonlocal): New declaration.
(d_lookup_nested_symbol): New declaration.
* d-namespace.c: New file.
commit 52bbc560524ec3691203eccd05207d13913a1e35
Author: Joel Brobecker <brobecker@adacore.com>
Date: Wed Aug 12 13:40:54 2015 -0700
gdb.base/dso2dso.exp: Improve testcase documentation.
gdb/testsuite/ChangeLog:
* gdb.base/dso2dso.exp: Improve the testcase's documentation.
commit 3207396b9532f179bad24a9fb9a83253f3f5144d
Author: Pedro Alves <palves@redhat.com>
Date: Thu Aug 13 18:56:42 2015 +0100
Fix Python frame unwinder issue caught by Valgrind
Valgrind shows:
==17026== Invalid write of size 8
==17026== at 0x54AA80: pending_frame_invalidate (py-unwind.c:477)
==17026== by 0x5AB934: do_my_cleanups (cleanups.c:155)
==17026== by 0x5AB9AF: do_cleanups (cleanups.c:177)
==17026== by 0x54B009: pyuw_sniffer (py-unwind.c:606)
==17026== by 0x755DAC: frame_unwind_try_unwinder (frame-unwind.c:105)
==17026== by 0x755EEE: frame_unwind_find_by_frame (frame-unwind.c:160)
==17026== by 0x750FFA: compute_frame_id (frame.c:454)
==17026== by 0x753BD6: get_prev_frame_if_no_cycle (frame.c:1781)
==17026== by 0x754292: get_prev_frame_always_1 (frame.c:1955)
==17026== by 0x7542DA: get_prev_frame_always (frame.c:1971)
==17026== by 0x7547BE: get_prev_frame (frame.c:2213)
==17026== by 0x7532BD: unwind_to_current_frame (frame.c:1450)
==17026== Address 0xd27b570 is 16 bytes inside a block of size 32 free'd
==17026== at 0x4A07577: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==17026== by 0x54B276: gdb_Py_DECREF (python-internal.h:185)
==17026== by 0x54B298: py_decref (py-utils.c:34)
==17026== by 0x5AB934: do_my_cleanups (cleanups.c:155)
==17026== by 0x5AB9AF: do_cleanups (cleanups.c:177)
==17026== by 0x54B009: pyuw_sniffer (py-unwind.c:606)
==17026== by 0x755DAC: frame_unwind_try_unwinder (frame-unwind.c:105)
==17026== by 0x755EEE: frame_unwind_find_by_frame (frame-unwind.c:160)
==17026== by 0x750FFA: compute_frame_id (frame.c:454)
==17026== by 0x753BD6: get_prev_frame_if_no_cycle (frame.c:1781)
==17026== by 0x754292: get_prev_frame_always_1 (frame.c:1955)
==17026== by 0x7542DA: get_prev_frame_always (frame.c:1971)
==17026==
Simply invalidate the object before releasing it.
gdb/ChangeLog:
2015-08-13 Pedro Alves <palves@redhat.com>
* python/py-unwind.c (pyuw_sniffer): Install the invalidate
cleanup after the decref cleanup, not before.
commit 67994074671a31e3d2fb78f6036f38095211ac49
Author: Keith Seitz <keiths@redhat.com>
Date: Thu Aug 13 09:48:12 2015 -0700
Mass rename `explicit' -> `explicit_loc'.
BuildBot reminded me that "explicit" is a reserved keyword in C++.
This patch simply renames all the (illegal) uses of "explicit". This should
fix the build errors with --enable-build-with-cxx bots.
gdb/ChangeLog
* break-catch-throw.c (re_set_exception_catchpoint) Rename
reserved C++ keyword "explicit" to "explicit_loc".
* breakpoint.c (create_overlay_event_breakpoint)
(create_longjmp_master_breakpoint)
(create_std_terminate_master_breakpoint)
(create_exception_master_breakpoint, update_static_tracepoint):
Rename reserved C++ keyword "explicit" to "explicit_loc".
* completer.c (collect_explicit_location_matches)
(explicit_location_completer): Rename reserved C++ keyword
"explicit" to "explicit_loc".
* linespec.c (struct linespec) <explicit>: Rename to "explicit_loc".
(canonicalize_linespec, create_sals_line_offset)
(convert_linespec_to_sals, convert_explicit_location_to_sals)
(event_location_to_sals, decode_objc): Rename reserved C++ keyword
"explicit" to "explicit_loc".
* location.c (struct event_location) <explicit>: Rename to
"explicit_loc".
(initialize_explicit_location, new_explicit_location)
(explicit_location_to_string_internal, explicit_location_to_linespec):
Rename reserved C++ keyword "explicit" to "explicit_loc".
* location.h (explicit_location_to_string)
(explicit_location_to_linespec, initialize_explicit_location)
(new_explicit_location): Rename reserved C++ keyword "explicit"
to "explicit_loc".
* mi/mi-cmd-break.c (mi_cmd_break_insert_1): Rename reserved C++
keyword "explicit" to "explicit_loc".
-----------------------------------------------------------------------
Summary of changes:
bfd/ChangeLog | 5 +
bfd/elf32-or1k.c | 6 +-
bfd/version.h | 2 +-
gdb/ChangeLog | 127 ++++
gdb/MAINTAINERS | 1 +
gdb/Makefile.in | 4 +-
gdb/NEWS | 7 +
gdb/break-catch-throw.c | 8 +-
gdb/breakpoint.c | 44 +-
gdb/cli/cli-cmds.c | 44 ++-
gdb/completer.c | 28 +-
gdb/d-exp.y | 792 ++++++++++++++------------
gdb/d-lang.c | 2 +-
gdb/d-lang.h | 10 +
gdb/d-namespace.c | 562 ++++++++++++++++++
gdb/disasm.c | 404 ++++++++++++-
gdb/disasm.h | 3 +-
gdb/doc/ChangeLog | 6 +
gdb/doc/gdb.texinfo | 121 ++++-
gdb/gdbserver/ChangeLog | 4 +
gdb/gdbserver/linux-low.c | 30 +-
gdb/linespec.c | 87 ++--
gdb/location.c | 72 ++--
gdb/location.h | 9 +-
gdb/mi/mi-cmd-break.c | 22 +-
gdb/mi/mi-cmd-disas.c | 39 +-
gdb/python/py-unwind.c | 2 +-
gdb/record.c | 2 +-
gdb/solib-svr4.c | 63 ++-
gdb/testsuite/ChangeLog | 22 +
gdb/testsuite/gdb.base/disasm-optim.S | 352 ++++++++++++
gdb/testsuite/gdb.base/disasm-optim.c | 27 +
gdb/testsuite/gdb.base/disasm-optim.exp | 40 ++
gdb/testsuite/gdb.base/disasm-optim.h | 26 +
gdb/testsuite/gdb.base/dso2dso.exp | 14 +-
gdb/testsuite/gdb.mi/mi-disassemble.exp | 2 +-
gdb/testsuite/gdb.perf/lib/perftest/utils.py | 1 +
gdb/testsuite/lib/mi-support.exp | 14 +-
38 files changed, 2414 insertions(+), 590 deletions(-)
create mode 100644 gdb/d-namespace.c
create mode 100644 gdb/testsuite/gdb.base/disasm-optim.S
create mode 100644 gdb/testsuite/gdb.base/disasm-optim.c
create mode 100644 gdb/testsuite/gdb.base/disasm-optim.exp
create mode 100644 gdb/testsuite/gdb.base/disasm-optim.h
First 500 lines of diff:
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 9ba5902..09f7650 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-14 Alan Modra <amodra@gmail.com>
+
+ PR ld/18759
+ * elf32-or1k.c: Revert 2015-08-11 change.
+
2015-08-13 H.J. Lu <hongjiu.lu@intel.com>
PR ld/18801
diff --git a/bfd/elf32-or1k.c b/bfd/elf32-or1k.c
index 7cb093c..efcefea 100644
--- a/bfd/elf32-or1k.c
+++ b/bfd/elf32-or1k.c
@@ -199,7 +199,7 @@ static reloc_howto_type or1k_elf_howto_table[] =
FALSE, /* partial_inplace */
0, /* src_mask */
0xffffffff, /* dst_mask */
- TRUE), /* pcrel_offset */
+ FALSE), /* pcrel_offset */
HOWTO (R_OR1K_16_PCREL,
0, /* rightshift */
@@ -213,7 +213,7 @@ static reloc_howto_type or1k_elf_howto_table[] =
FALSE, /* partial_inplace */
0, /* src_mask */
0xffff, /* dst_mask */
- TRUE), /* pcrel_offset */
+ FALSE), /* pcrel_offset */
HOWTO (R_OR1K_8_PCREL,
0, /* rightshift */
@@ -227,7 +227,7 @@ static reloc_howto_type or1k_elf_howto_table[] =
FALSE, /* partial_inplace */
0, /* src_mask */
0xff, /* dst_mask */
- TRUE), /* pcrel_offset */
+ FALSE), /* pcrel_offset */
HOWTO (R_OR1K_GOTPC_HI16, /* Type. */
16, /* Rightshift. */
diff --git a/bfd/version.h b/bfd/version.h
index 68b79ad..1579c8e 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20150813
+#define BFD_VERSION_DATE 20150815
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
#define REPORT_BUGS_TO @report_bugs_to@
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 99b0eb8..298f44d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,101 @@
+2015-08-14 Doug Evans <xdje42@gmail.com>
+
+ PR gdb/11833
+ * NEWS: Document new /s modifier for the disassemble command.
+ * cli/cli-cmds.c (disassemble_command): Add support for /s.
+ (_initialize_cli_cmds): Update online docs of disassemble command.
+ * disasm.c: #include "source.h".
+ (struct deprecated_dis_line_entry): Renamed from dis_line_entry.
+ All uses updated.
+ (dis_line_entry): New struct.
+ (hash_dis_line_entry, eq_dis_line_entry): New functions.
+ (allocate_dis_line_table): New functions.
+ (maybe_add_dis_line_entry, line_has_code_p): New functions.
+ (dump_insns): New arg end_pc. All callers updated.
+ (do_mixed_source_and_assembly_deprecated): Renamed from
+ do_mixed_source_and_assembly. All callers updated.
+ (do_mixed_source_and_assembly): New function.
+ (gdb_disassembly): Handle /s (DISASSEMBLY_SOURCE).
+ * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED): Renamed from
+ DISASSEMBLY_SOURCE. All uses updated.
+ (DISASSEMBLY_SOURCE): New macro.
+ * mi/mi-cmd-disas.c (mi_cmd_disassemble): New modes 4,5.
+
+2015-08-14 Keith Seitz <keiths@redhat.com>
+
+ * d-exp.y (PrimaryExpression : TypeExp '.' IdentifierExp): Rename
+ `typename' to `type_name' to avoid C++ reserved word.
+
+2015-08-14 Keith Seitz <keiths@redhat.com>
+
+ * location.c (EL_TYPE, EL_LINESPEC, EL_PROBE, EL_ADDRESS)
+ (EL_EXPLICIT, EL_STRING): Change macro parameter to "P" to
+ silence ARI errors.
+
+2015-08-14 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * d-exp.y (PrimaryExpression : TypeExp '.' IdentifierExp): Use
+ xstrprintf instead of malloc and sprintf.
+ (PrimaryExpression : IdentifierExp): Avoid operator at end of line.
+ (lex_one_token): Likewise.
+
+2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
+
+ * solib-svr4.c (read_program_header): Add base_addr argument to
+ report the runtime address of the segment.
+ (find_program_interpreter): Update read_program_header call to pass
+ a NULL pointer for the new argument.
+ (scan_dyntag): Add ptr_addr argument to report the runtime address
+ of the tag payload.
+ (scan_dyntag_auxv): Likewise and use thew new base_addr argument of
+ read_program_header to get the base address of the dynamic segment.
+ (elf_locate_base): Update uses of scan_dyntag, scan_dyntag_auxv and
+ read_program_header.
+ (elf_locate_base): Scan for and handle DT_MIPS_RLD_MAP_REL.
+
+2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
+
+ * MAINTAINERS (Write After Approval): Add Matthew Fortune.
+
+2015-08-13 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * d-exp.y (%union): Add voidval.
+ (%token): Add UNKNOWN_NAME as a token to represent an unclassified
+ name in the lexing stage.
+ (PostfixExpression): Move symbol completion handling in grammar here
+ from PrimaryExpression.
+ (PrimaryExpression): Move routines to handle resolving identifier
+ tokens in the grammar here from push_expression_name.
+ (IdentifierExp): Remove the handling of alternating '.' and identifier
+ tokens.
+ (TypeExp): Allow TypeExp to be wrapped in parenthesis in the grammar.
+ (BasicType): Remove C-style typename rules.
+ (d_type_from_name, d_module_from_name, push_variable)
+ (push_fieldnames, push_type_name, push_module_name)
+ (push_expression_name): Remove.
+ (lex_one_token): Rename from yylex. Replace pstate with par_state.
+ (token_and_value): New type.
+ (token_fifo, popping, name_obstack): New globals.
+ (classify_name): New function.
+ (classify_inner_name): Likewise.
+ (yylex): Likewise.
+ (d_parse): Initialize token_fifo, popping and name_obstack.
+
+2015-08-13 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * Makefile.in (SFILES): Add d-namespace.c.
+ (COMMON_OBS): Add d-namespace.o.
+ * d-lang.c (d_language_defn): Use d_lookup_symbol_nonlocal as the
+ la_lookup_symbol_nonlocal callback function pointer.
+ * d-lang.h (d_lookup_symbol_nonlocal): New declaration.
+ (d_lookup_nested_symbol): New declaration.
+ * d-namespace.c: New file.
+
+2015-08-13 Pedro Alves <palves@redhat.com>
+
+ * python/py-unwind.c (pyuw_sniffer): Install the invalidate
+ cleanup after the decref cleanup, not before.
+
2015-08-13 Pierre-Marie de Rodat <derodat@adacore.com>
* ada-lang.c: Include namespace.h
@@ -54,6 +152,35 @@
2015-08-12 Keith Seitz <keiths@redhat.com>
+ * break-catch-throw.c (re_set_exception_catchpoint) Rename
+ reserved C++ keyword "explicit" to "explicit_loc".
+ * breakpoint.c (create_overlay_event_breakpoint)
+ (create_longjmp_master_breakpoint)
+ (create_std_terminate_master_breakpoint)
+ (create_exception_master_breakpoint, update_static_tracepoint):
+ Rename reserved C++ keyword "explicit" to "explicit_loc".
+ * completer.c (collect_explicit_location_matches)
+ (explicit_location_completer): Rename reserved C++ keyword
+ "explicit" to "explicit_loc".
+ * linespec.c (struct linespec) <explicit>: Rename to "explicit_loc".
+ (canonicalize_linespec, create_sals_line_offset)
+ (convert_linespec_to_sals, convert_explicit_location_to_sals)
+ (event_location_to_sals, decode_objc): Rename reserved C++ keyword
+ "explicit" to "explicit_loc".
+ * location.c (struct event_location) <explicit>: Rename to
+ "explicit_loc".
+ (initialize_explicit_location, new_explicit_location)
+ (explicit_location_to_string_internal, explicit_location_to_linespec):
+ Rename reserved C++ keyword "explicit" to "explicit_loc".
+ * location.h (explicit_location_to_string)
+ (explicit_location_to_linespec, initialize_explicit_location)
+ (new_explicit_location): Rename reserved C++ keyword "explicit"
+ to "explicit_loc".
+ * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Rename reserved C++
+ keyword "explicit" to "explicit_loc".
+
+2015-08-12 Keith Seitz <keiths@redhat.com>
+
* python/python.c (gdbpy_decode_line): Initialize `location' to NULL
and only call decode_line_1 when it is non-NULL.
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index f774c6e..9b395d7 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -517,6 +517,7 @@ Doug Evans dje@google.com
Adam Fedor fedor@gnu.org
Max Filippov jcmvbkbc@gmail.com
Brian Ford ford@vss.fsi.com
+Matthew Fortune matthew.fortune@imgtec.com
Orjan Friberg orjanf@axis.com
Andreas From andreas.from@ericsson.com
Nathan Froyd froydnj@codesourcery.com
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 4b25d4a..3247126 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -839,7 +839,7 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
charset.c common/cleanups.c cli-out.c coffread.c coff-pe-read.c \
complaints.c completer.c continuations.c corefile.c corelow.c \
cp-abi.c cp-support.c cp-namespace.c cp-valprint.c \
- d-exp.y d-lang.c d-valprint.c \
+ d-exp.y d-lang.c d-namespace.c d-valprint.c \
cp-name-parser.y \
dbxread.c demangle.c dictionary.c disasm.c doublest.c \
dtrace-probe.c dummy-frame.c \
@@ -1073,7 +1073,7 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
frame-base.o \
inline-frame.o \
gnu-v2-abi.o gnu-v3-abi.o cp-abi.o cp-support.o \
- cp-namespace.o \
+ cp-namespace.o d-namespace.o \
reggroups.o \
trad-frame.o \
tramp-frame.o \
diff --git a/gdb/NEWS b/gdb/NEWS
index 538c185..df19e24 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -20,6 +20,13 @@ maint show target-non-stop
"set non-stop" is "off". The default is "auto", meaning non-stop
mode is enabled if supported by the target.
+* The "disassemble" command accepts a new modifier: /s.
+ It prints mixed source+disassembly like /m with two differences:
+ - disassembled instructions are now printed in program order, and
+ - and source for all relevant files is now printed.
+ The "/m" option is now considered deprecated: its "source-centric"
+ output hasn't proved useful in practice.
+
* New options
set validate-build-id (on|off)
diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c
index 209c3e3..1ba505b 100644
--- a/gdb/break-catch-throw.c
+++ b/gdb/break-catch-throw.c
@@ -229,12 +229,12 @@ re_set_exception_catchpoint (struct breakpoint *self)
catchpoint mode. */
TRY
{
- struct explicit_location explicit;
+ struct explicit_location explicit_loc;
- initialize_explicit_location (&explicit);
- explicit.function_name
+ initialize_explicit_location (&explicit_loc);
+ explicit_loc.function_name
= ASTRDUP (exception_functions[kind].function);
- location = new_explicit_location (&explicit);
+ location = new_explicit_location (&explicit_loc);
cleanup = make_cleanup_delete_event_location (location);
self->ops->decode_location (self, location, &sals);
do_cleanups (cleanup);
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index a6994c7..052aeb9 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -3424,7 +3424,7 @@ create_overlay_event_breakpoint (void)
struct breakpoint *b;
struct breakpoint_objfile_data *bp_objfile_data;
CORE_ADDR addr;
- struct explicit_location explicit;
+ struct explicit_location explicit_loc;
bp_objfile_data = get_breakpoint_objfile_data (objfile);
@@ -3449,9 +3449,9 @@ create_overlay_event_breakpoint (void)
b = create_internal_breakpoint (get_objfile_arch (objfile), addr,
bp_overlay_event,
&internal_breakpoint_ops);
- initialize_explicit_location (&explicit);
- explicit.function_name = ASTRDUP (func_name);
- b->location = new_explicit_location (&explicit);
+ initialize_explicit_location (&explicit_loc);
+ explicit_loc.function_name = ASTRDUP (func_name);
+ b->location = new_explicit_location (&explicit_loc);
if (overlay_debugging == ovly_auto)
{
@@ -3548,7 +3548,7 @@ create_longjmp_master_breakpoint (void)
struct breakpoint *b;
const char *func_name;
CORE_ADDR addr;
- struct explicit_location explicit;
+ struct explicit_location explicit_loc;
if (msym_not_found_p (bp_objfile_data->longjmp_msym[i].minsym))
continue;
@@ -3571,9 +3571,9 @@ create_longjmp_master_breakpoint (void)
addr = BMSYMBOL_VALUE_ADDRESS (bp_objfile_data->longjmp_msym[i]);
b = create_internal_breakpoint (gdbarch, addr, bp_longjmp_master,
&internal_breakpoint_ops);
- initialize_explicit_location (&explicit);
- explicit.function_name = ASTRDUP (func_name);
- b->location = new_explicit_location (&explicit);
+ initialize_explicit_location (&explicit_loc);
+ explicit_loc.function_name = ASTRDUP (func_name);
+ b->location = new_explicit_location (&explicit_loc);
b->enable_state = bp_disabled;
}
}
@@ -3604,7 +3604,7 @@ create_std_terminate_master_breakpoint (void)
{
struct breakpoint *b;
struct breakpoint_objfile_data *bp_objfile_data;
- struct explicit_location explicit;
+ struct explicit_location explicit_loc;
bp_objfile_data = get_breakpoint_objfile_data (objfile);
@@ -3630,9 +3630,9 @@ create_std_terminate_master_breakpoint (void)
b = create_internal_breakpoint (get_objfile_arch (objfile), addr,
bp_std_terminate_master,
&internal_breakpoint_ops);
- initialize_explicit_location (&explicit);
- explicit.function_name = ASTRDUP (func_name);
- b->location = new_explicit_location (&explicit);
+ initialize_explicit_location (&explicit_loc);
+ explicit_loc.function_name = ASTRDUP (func_name);
+ b->location = new_explicit_location (&explicit_loc);
b->enable_state = bp_disabled;
}
}
@@ -3656,7 +3656,7 @@ create_exception_master_breakpoint (void)
struct gdbarch *gdbarch;
struct breakpoint_objfile_data *bp_objfile_data;
CORE_ADDR addr;
- struct explicit_location explicit;
+ struct explicit_location explicit_loc;
bp_objfile_data = get_breakpoint_objfile_data (objfile);
@@ -3737,9 +3737,9 @@ create_exception_master_breakpoint (void)
¤t_target);
b = create_internal_breakpoint (gdbarch, addr, bp_exception_master,
&internal_breakpoint_ops);
- initialize_explicit_location (&explicit);
- explicit.function_name = ASTRDUP (func_name);
- b->location = new_explicit_location (&explicit);
+ initialize_explicit_location (&explicit_loc);
+ explicit_loc.function_name = ASTRDUP (func_name);
+ b->location = new_explicit_location (&explicit_loc);
b->enable_state = bp_disabled;
}
@@ -13947,7 +13947,7 @@ update_static_tracepoint (struct breakpoint *b, struct symtab_and_line sal)
struct symbol *sym;
struct static_tracepoint_marker *tpmarker;
struct ui_out *uiout = current_uiout;
- struct explicit_location explicit;
+ struct explicit_location explicit_loc;
tpmarker = VEC_index (static_tracepoint_marker_p, markers, 0);
@@ -13989,12 +13989,12 @@ update_static_tracepoint (struct breakpoint *b, struct symtab_and_line sal)
b->loc->symtab = sym != NULL ? sal2.symtab : NULL;
delete_event_location (b->location);
- initialize_explicit_location (&explicit);
- explicit.source_filename
+ initialize_explicit_location (&explicit_loc);
+ explicit_loc.source_filename
= ASTRDUP (symtab_to_filename_for_display (sal2.symtab));
- explicit.line_offset.offset = b->loc->line_number;
- explicit.line_offset.sign = LINE_OFFSET_NONE;
- b->location = new_explicit_location (&explicit);
+ explicit_loc.line_offset.offset = b->loc->line_number;
+ explicit_loc.line_offset.sign = LINE_OFFSET_NONE;
+ b->location = new_explicit_location (&explicit_loc);
/* Might be nice to check if function changed, and warn if
so. */
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 68af26b..5be758d 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -1176,16 +1176,26 @@ disassemble_current_function (int flags)
/* Dump a specified section of assembly code.
Usage:
- disassemble [/mr]
+ disassemble [/mrs]
- dump the assembly code for the function of the current pc
- disassemble [/mr] addr
+ disassemble [/mrs] addr
- dump the assembly code for the function at ADDR
- disassemble [/mr] low,high
- disassemble [/mr] low,+length
+ disassemble [/mrs] low,high
+ disassemble [/mrs] low,+length
- dump the assembly code in the range [LOW,HIGH), or [LOW,LOW+length)
- A /m modifier will include source code with the assembly.
- A /r modifier will include raw instructions in hex with the assembly. */
+ A /m modifier will include source code with the assembly in a
+ "source centric" view. This view lists only the file of the first insn,
+ even if other source files are involved (e.g., inlined functions), and
+ the output is in source order, even with optimized code. This view is
+ considered deprecated as it hasn't been useful in practice.
+
+ A /r modifier will include raw instructions in hex with the assembly.
+
+ A /s modifier will include source code with the assembly, like /m, with
+ two important differences:
+ 1) The output is still in pc address order.
+ 2) File names and contents for all relevant source files are displayed. */
static void
disassemble_command (char *arg, int from_tty)
@@ -1213,11 +1223,14 @@ disassemble_command (char *arg, int from_tty)
switch (*p++)
{
case 'm':
- flags |= DISASSEMBLY_SOURCE;
+ flags |= DISASSEMBLY_SOURCE_DEPRECATED;
break;
case 'r':
flags |= DISASSEMBLY_RAW_INSN;
break;
+ case 's':
+ flags |= DISASSEMBLY_SOURCE;
+ break;
default:
error (_("Invalid disassembly modifier."));
}
@@ -1226,6 +1239,10 @@ disassemble_command (char *arg, int from_tty)
p = skip_spaces_const (p);
}
+ if ((flags & (DISASSEMBLY_SOURCE_DEPRECATED | DISASSEMBLY_SOURCE))
+ == (DISASSEMBLY_SOURCE_DEPRECATED | DISASSEMBLY_SOURCE))
+ error (_("Cannot specify both /m and /s."));
+
if (! p || ! *p)
{
flags |= DISASSEMBLY_OMIT_FNAME;
@@ -1886,8 +1903,21 @@ the other arg."));
c = add_com ("disassemble", class_vars, disassemble_command, _("\
Disassemble a specified section of memory.\n\
Default is the function surrounding the pc of the selected frame.\n\
+\n\
With a /m modifier, source lines are included (if available).\n\
+This view is \"source centric\": the output is in source line order,\n\
+regardless of any optimization that is present. Only the main source file\n\
+is displayed, not those of, e.g., any inlined functions.\n\
+This modifier hasn't proved useful in practice and is deprecated\n\
+in favor of /s.\n\
+\n\
+With a /s modifier, source lines are included (if available).\n\
+This differs from /m in two important respects:\n\
+- the output is still in pc address order, and\n\
+- file names and contents for all relevant source files are displayed.\n\
+\n\
With a /r modifier, raw instructions in hex are included.\n\
+\n\
With a single argument, the function surrounding that address is dumped.\n\
Two arguments (separated by a comma) are taken as a range of memory to dump,\n\
in the form of \"start,end\", or \"start,+length\".\n\
diff --git a/gdb/completer.c b/gdb/completer.c
index 7fc27b1..821f882 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -358,14 +358,15 @@ collect_explicit_location_matches (struct event_location *location,
const char *word)
{
VEC (char_ptr) *matches = NULL;
- const struct explicit_location *explicit = get_explicit_location (location);
+ const struct explicit_location *explicit_loc
+ = get_explicit_location (location);
switch (what)
{
case MATCH_SOURCE:
{
- const char *text = (explicit->source_filename == NULL
- ? "" : explicit->source_filename);
+ const char *text = (explicit_loc->source_filename == NULL
+ ? "" : explicit_loc->source_filename);
matches = make_source_files_completion_list (text, word);
}
@@ -373,14 +374,14 @@ collect_explicit_location_matches (struct event_location *location,
case MATCH_FUNCTION:
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [SCM] jankratochvil/gdbserverbuildid: sticky
@ 2015-08-13 19:02 jkratoch
0 siblings, 0 replies; 8+ messages in thread
From: jkratoch @ 2015-08-13 19:02 UTC (permalink / raw)
To: archer-commits
The branch, jankratochvil/gdbserverbuildid has been updated
discards 909dd6affb55d8b542927f5b100dbc07e4d44600 (commit)
discards dd1f9111db27e548ba5ee806cf5bf973d9186462 (commit)
discards 49a92823038b0c4d2045324cfd1cffef7ba9208f (commit)
discards 22fc794dee30a61629efb52ab01128794838d9cd (commit)
discards 3c4181a65e97fb1b06f2b79943b8164831526352 (commit)
discards 85e797c9c96085b1185ef56960aeb78152104929 (commit)
discards 6f6952ad4d8a960c4dff7227c17da8e847dd934f (commit)
discards a9e8f9276e9e885514976e32b2fc35eb948a06a3 (commit)
discards 891ddd140494720c0d377e93dbdf7d38ae9e87eb (commit)
discards cde2f3a7d920f20b13bb61829802634d3aceaca9 (commit)
discards 52ae466c4eae8e2e57d9dc59fce60ca6c6795693 (commit)
discards 8359c2e7189922a91d9621e297189f3cbf3295aa (commit)
discards 46b1c839077b938af4ee1c22b10fc5609700324a (commit)
discards 05cdf191ff60a5c977b14e2d338bf005e89ff104 (commit)
discards 64cf1545812f341132c7bb4faad5f2938f4c931d (commit)
discards 439ef35c5653d3a9724502ec1ad6662b1273fdb7 (commit)
discards 6bc4d3b31dbfa2996a329a350664a9eef4e2fe15 (commit)
discards bfde840e829396b99837812d568e945632ab49ff (commit)
via d2ef8af905e3c800284385c8690da040302328ae (commit)
via 8f5e9db1cf58809678aab42fa58c37f03029e630 (commit)
via e53bb70e546bd8c522b699f7dd1c39795534eade (commit)
via e2a7020361598cf9b3e6fa54d7d0bcea78e9fae6 (commit)
via 6a4c1b31f5bf5e796336de40689bbd4bfc047a5e (commit)
via 7364e72a472c8f95977aec0b8804cf42dcd86eb2 (commit)
via ad2f3404e4a1666cf691566f41c33e1adb45817d (commit)
via d9eb82ccf176f569cf9b1bea4d057372abd8be7b (commit)
via 1da182968922bded291ef015b2e9ae098021de43 (commit)
via 3011db9cf05c1553bb7e227687190c0f26b32c58 (commit)
via 3ea6568826aaa1dc73f2ed9cea77dbd763e0633e (commit)
via cd1049766a086d465a13f60db4b1b1ba2ff0e2c2 (commit)
via 3e4d2a0385640ed6c9a5edd0a4a07ec1483ed6de (commit)
via 6545df5ecd569693f1c201206a2501d249bdc6a8 (commit)
via a6d3a59c67567e73474c5944ee058480bb759a89 (commit)
via fc9bc2b2606abb979bf3aae46464a86472158e71 (commit)
via e5b168bf9555d5f4d4f870c9db4d71d41ab2f35d (commit)
via 83b9bd71abd6eebb7f096e05e6d28cd2209765a1 (commit)
from 909dd6affb55d8b542927f5b100dbc07e4d44600 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit d2ef8af905e3c800284385c8690da040302328ae
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:20 2015 +0200
sticky
Message-Id: <1433754079-10395-1-git-send-email-gbenson@redhat.com>
Philippe Waroquiers wrote:
> On Fri, 2015-06-05 at 12:22 +0100, Gary Benson wrote:
> > Built and regtested on RHEL6.6 x86_64.
> I tested with the last SVN version of the Valgrind gdbserver (that
> supports qXfer:exec-file:read+).
>
> The patch introduces a regression:
> with the patch, GDB does not anymore automatically load the
> exec-file.
>
> I bypassed this problem by ignoring fake_pid_p in remote.c:
> --- a/gdb/remote.c
> +++ b/gdb/remote.c
> @@ -1624,9 +1624,13 @@ remote_add_inferior (int fake_pid_p, int pid, int
> attached,
> inf->attach_flag = attached;
> inf->fake_pid_p = fake_pid_p;
>
> - /* If no main executable is currently open then attempt to
> - open the file that was executed to create this inferior. */
> - if (try_open_exec && get_exec_file (0) == NULL)
> + /* Attempt to open the file that was executed to create this
> + inferior. If the user has explicitly specified executable
> + and/or symbol files then warn the user if their choices do
> + not match. Otherwise, set exec_file and symfile_objfile to
> + the new file. */
> + printf("fake_pid_p %d\n", fake_pid_p);
> + if (try_open_exec)// && !fake_pid_p)
> exec_file_locate_attach (pid, 1);
>
> Effectively, the printf shows that with Valgrind gdbsrv,
> fake_pid_p value is 1.
>
> When ignoring fake_pid_p, GDB can properly attach
> to different Valgrind gdbsrv, and changes of executable
> as expected.
Ah, it seems I mailed a bad patch, my apologies! I was working on
two fixes that touched the same line, and it looks like I rebased
them in the wrong order.
This updated patch has been created against the latest gdb/master
(80fb91378c91a8239817a5ab2b1c3e346109db25). Could you please try
your tests again?
Thanks,
Gary
---
On attach, GDB will only attempt to determine the main executable's
filename if one is not already set. This causes problems if you
attach to one process and then attach to another: GDB will not attempt
to discover the main executable on the second attach. If the two
processes have different main executable files then the symbols will
now be wrong. This is PR gdb/17626.
In GDB some filenames are supplied by the user (e.g. using the "file"
or "symbol-file" commands) and some are determined by GDB (e.g. while
processing an "attach" command). This commit updates GDB to track
which filenames were supplied by the user. When GDB might attempt to
determine an executable filename and one is already set, filenames
determined by GDB may be overridden but user-supplied filenames will
not.
gdb/ChangeLog:
PR gdb/17626
* progspace.h (struct program_space)
<pspace_exec_file_is_user_supplied>: New field.
<symfile_object_file_is_user_supplied>: Likewise.
(symfile_objfile_is_user_supplied): New macro.
* exec.h (exec_file_is_user_supplied): Likewise.
* exec.c (exec_close): Clear exec_file_is_user_supplied.
(exec_file_locate_attach): Remove get_exec_file check.
Do not replace user-supplied executable or symbol files.
Warn if user-supplied executable or symbol files do not
match discovered file.
(exec_file_command): Set exec_file_is_user_supplied.
* symfile.c (symbol_file_clear): Clear
symfile_objfile_is_user_supplied.
(symbol_file_command): Set symfile_objfile_is_user_supplied.
* inferior.c (add_inferior_command): Set
exec_file_is_user_supplied and symfile_objfile_is_user_supplied.
* main.c (captured_main): Likewise.
* infcmd.c (attach_command_post_wait): Always call
exec_file_locate_attach. Only call reopen_exec_file and
reread_symbols if exec_file_is_user_supplied.
* remote.c (remote_add_inferior): Remove get_exec_file check
around exec_file_locate_attach.
commit 8f5e9db1cf58809678aab42fa58c37f03029e630
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:19 2015 +0200
mainbuildid
commit e53bb70e546bd8c522b699f7dd1c39795534eade
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:19 2015 +0200
hexallocate
commit e2a7020361598cf9b3e6fa54d7d0bcea78e9fae6
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:19 2015 +0200
locatetest
commit 6a4c1b31f5bf5e796336de40689bbd4bfc047a5e
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:19 2015 +0200
Tests for validate symbol file using build-id
New testcase.
gdb/testsuite/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Tests for validate symbol file using build-id.
* gdb.base/solib-mismatch-lib.c: New file.
* gdb.base/solib-mismatch-libmod.c: New file.
* gdb.base/solib-mismatch.c: New file.
* gdb.base/solib-mismatch.exp: New file.
commit 7364e72a472c8f95977aec0b8804cf42dcd86eb2
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:18 2015 +0200
buildidwarn
commit ad2f3404e4a1666cf691566f41c33e1adb45817d
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:18 2015 +0200
buildidsolibbfdopen
commit d9eb82ccf176f569cf9b1bea4d057372abd8be7b
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:18 2015 +0200
buildidverify
commit 1da182968922bded291ef015b2e9ae098021de43
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:18 2015 +0200
buildidsolibsearch
commit 3011db9cf05c1553bb7e227687190c0f26b32c58
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:18 2015 +0200
buildidtofile
commit 3ea6568826aaa1dc73f2ed9cea77dbd763e0633e
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:17 2015 +0200
buildidproto
commit cd1049766a086d465a13f60db4b1b1ba2ff0e2c2
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:17 2015 +0200
buildidtobfd
commit 3e4d2a0385640ed6c9a5edd0a4a07ec1483ed6de
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:17 2015 +0200
buildidforcemove
commit 6545df5ecd569693f1c201206a2501d249bdc6a8
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:17 2015 +0200
buildidfreefix
commit a6d3a59c67567e73474c5944ee058480bb759a89
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:16 2015 +0200
openpsymfile
commit fc9bc2b2606abb979bf3aae46464a86472158e71
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:16 2015 +0200
openpsolib
commit e5b168bf9555d5f4d4f870c9db4d71d41ab2f35d
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:16 2015 +0200
openp
commit 83b9bd71abd6eebb7f096e05e6d28cd2209765a1
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:16 2015 +0200
filelib
-----------------------------------------------------------------------
Summary of changes:
gdb/source.c | 9 ++++-----
gdb/source.h | 1 +
2 files changed, 5 insertions(+), 5 deletions(-)
First 500 lines of diff:
diff --git a/gdb/source.c b/gdb/source.c
index 827699d..2b3650d 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -750,7 +750,7 @@ file_location_free (struct file_location *file)
{
if (file->fd != -1)
{
- if (is_target_filename (file->filename))
+ if (file->load_via_target)
{
int target_errno;
@@ -785,7 +785,6 @@ struct file_location
file_location_from_filename (const char *filename, enum openp_flags opts, size_t build_idsz, const gdb_byte *build_id)
{
struct file_location file;
- int load_via_target = 0;
struct cleanup *back_to;
memset (&file, 0, sizeof (file));
@@ -798,7 +797,7 @@ file_location_from_filename (const char *filename, enum openp_flags opts, size_t
filename += strlen (TARGET_SYSROOT_PREFIX);
if (!target_filesystem_is_local ())
{
- load_via_target = 1;
+ file.load_via_target = 1;
/* gdb_bfd_fopen does not support "target:" filenames. */
if (write_files)
@@ -808,7 +807,7 @@ file_location_from_filename (const char *filename, enum openp_flags opts, size_t
}
}
- if (load_via_target)
+ if (file.load_via_target)
{
int target_errno;
@@ -841,7 +840,7 @@ file_location_from_filename (const char *filename, enum openp_flags opts, size_t
return file;
}
- if (load_via_target)
+ if (file.load_via_target)
{
const int do_close = (opts & OPF_IS_BFD) != 0;
diff --git a/gdb/source.h b/gdb/source.h
index e079cf0..113957b 100644
--- a/gdb/source.h
+++ b/gdb/source.h
@@ -105,6 +105,7 @@ struct file_location
{
bfd *abfd;
char *filename;
+ unsigned char load_via_target;
int fd;
int file_errno;
bfd_error_type bfderr;
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [SCM] jankratochvil/gdbserverbuildid: sticky
@ 2015-08-13 14:22 jkratoch
0 siblings, 0 replies; 8+ messages in thread
From: jkratoch @ 2015-08-13 14:22 UTC (permalink / raw)
To: archer-commits
The branch, jankratochvil/gdbserverbuildid has been updated
discards f975d18d3004c9e94572ae7ffd4f999f87f80789 (commit)
discards 5d9fe80e2f8fa1f5be7ebac7fbc949ecf9ef5bff (commit)
discards 7c5f60122e4d26c473e20e6fdfe359afeaefb47d (commit)
discards 56b758842d2db86be20e6a5ca38b523dd26d548f (commit)
discards c94619a21113490af5ec998d7f1d24e371fa9640 (commit)
discards 49969d8c4672a677f52fe60457969cd897dd53df (commit)
discards 77a40858ba8b6554da1090ffdd0d20cf0c70f6a1 (commit)
discards a0e710b8adadb856bf39f5c5a9f275f84dd9a3ba (commit)
discards 045fcf62670e30bdc5d8af524046d3bb3f9221eb (commit)
discards 1ea2fe5053ab1113dfb672c680ccff1be2f290b9 (commit)
discards 5fd3c99615b2ab8c9aa8abc21337be115fcd37cd (commit)
discards 7ac5e9d57bc417c75c97f51f7c44fa55ee9c169b (commit)
discards c4e403dfad6c919454ef5d2663712853b6bcbae8 (commit)
discards d0d477a45c5d4ecdc2820d4d0414056d3023ae13 (commit)
discards ca83807584ebd8716a66f7088dd05271002e99d9 (commit)
discards 4f5d6aa4fce87c00f74b0f205535ebcec7302e27 (commit)
discards 12e1597a9084f5d4f122d00a011870ef00c92334 (commit)
discards 6e55ed2607f6efdc058a5b6605914e6f92193189 (commit)
discards fef843202f56678b4089b285d14133969f56c7e6 (commit)
discards 1d63ae5cb294f9d8f0a059c49b1cf0c877b42cb5 (commit)
discards 7b46b23c4bb32e7d2171ef4c19c20bf51c06d6f4 (commit)
discards 524206e9a325be3684efd7af59676c307d3d150f (commit)
discards bef667c7aff50753dd43712be95afab66fa94767 (commit)
discards e20832687edce5b65e90fa338d42aa821207e5af (commit)
discards 7a867eeefa6d8a282a119afd5cc43697bb938266 (commit)
discards 4791222f9fc2a35a62078243a53409f26799f34a (commit)
discards 92b2194c5c92566d5d05de65a49fba3f5a86df32 (commit)
discards 90082c6c1c4a9386e008f8ca470cc8fe14032ebe (commit)
discards a0df657b49186335025cde8aa62a1eadc7274ef5 (commit)
discards 8c1b24620df4b7bf532fe4ecbf2bfd4c3adc1ef9 (commit)
discards 45aa3a918c168453a915fa10b376f0642009584d (commit)
discards 12f6dcb9318784724efe2e38d5c44a8f7af0a360 (commit)
discards 105d76cc897ee03ba97c6048089b0b6d1b8ef69b (commit)
discards 05a4e248b9e2d1b387235cd2d8cb577757fb6b52 (commit)
via 909dd6affb55d8b542927f5b100dbc07e4d44600 (commit)
via dd1f9111db27e548ba5ee806cf5bf973d9186462 (commit)
via 49a92823038b0c4d2045324cfd1cffef7ba9208f (commit)
via 22fc794dee30a61629efb52ab01128794838d9cd (commit)
via 3c4181a65e97fb1b06f2b79943b8164831526352 (commit)
via 85e797c9c96085b1185ef56960aeb78152104929 (commit)
via 6f6952ad4d8a960c4dff7227c17da8e847dd934f (commit)
via a9e8f9276e9e885514976e32b2fc35eb948a06a3 (commit)
via 891ddd140494720c0d377e93dbdf7d38ae9e87eb (commit)
via cde2f3a7d920f20b13bb61829802634d3aceaca9 (commit)
via 52ae466c4eae8e2e57d9dc59fce60ca6c6795693 (commit)
via 8359c2e7189922a91d9621e297189f3cbf3295aa (commit)
via 46b1c839077b938af4ee1c22b10fc5609700324a (commit)
via 05cdf191ff60a5c977b14e2d338bf005e89ff104 (commit)
via 64cf1545812f341132c7bb4faad5f2938f4c931d (commit)
via 439ef35c5653d3a9724502ec1ad6662b1273fdb7 (commit)
via 6bc4d3b31dbfa2996a329a350664a9eef4e2fe15 (commit)
via bfde840e829396b99837812d568e945632ab49ff (commit)
via ae70d8fa734033d1e197a8ce21bc82c393e9bfdd (commit)
via 8f6abda46262ef44b8f448be3643ea502288f3ee (commit)
via 3eaf8395d993ffd039863c5d61f77c59b27cdd4b (commit)
via 629f7538f1c705deefe237b87153597e8bf6b4b1 (commit)
via fb1352c863ab57bef975d9826efb4de0a7a49e63 (commit)
via e655914ce35a288d78848a6126b911e874d0f23e (commit)
via 02f3bfabeb4b3d8aefc23c5e0a7e9229c2da0c1a (commit)
via 90721dfec76d65d29ac5fbf49c5718bd850abe41 (commit)
via ce4a423657022eb9dca3552b287e8db3a8bae5de (commit)
via 208dacff86eca30c3f5990905f66f18e19ffbb57 (commit)
via b5d50914f4202b1f15df5e6c1b4868726dc5f43c (commit)
via bce282542cdcc386678a05f66a3aae1cac40f39d (commit)
via 88e1a37952d639ba05a92032e3a0d94ab466bed4 (commit)
via f8688948e2ef7e8ccc1899ab34a824d9904ef469 (commit)
via 257ed7ddfe7b6eeccc1782ed3b6c5a8e1a10e951 (commit)
via 7a460e688c25393f8bde0d9ee51be0475e40b169 (commit)
via 8efa2874ab298f3923f4127340da119435f87c39 (commit)
via 4ab90a7a90ccf8a671f139c1c6387ba8028e6011 (commit)
via e5a764c49c138d9409a807698d853225a4c8351f (commit)
via 5d8c3ed327fff9993d89ab8b35e2cbae67e2a51e (commit)
via 22cee43f9af76fc4c10c3d4018a9ada6d7c5c1a5 (commit)
via 19c2883a9b92e2be695368e19788fd0210d732d4 (commit)
via c14c7a8a619ce03a7c8f41d1cfac3af728df453b (commit)
via 9791c250490d7c3c961860419e4436c758a91a21 (commit)
via ea8812bceab054cab438bb51916f1d81118811b3 (commit)
via c74e78b36ce4904b733e6fa7e295fd4b15ac0596 (commit)
via 13a2df29c930eda49837741902b67021ab004990 (commit)
via 4dafcdeb1341c4dd1a4641373bc17aab3ef2e788 (commit)
via 59ecaff36145add82c315ba7a008c4a5db4a6f51 (commit)
via b46824bd49648c575372e6d9bc6a6defeabd6ed5 (commit)
via 5ba325978c354b9f0e238864e3afb4f9b528c04e (commit)
via 40fc1451c63d21a1448bb21e39a7b70ecb959213 (commit)
from f975d18d3004c9e94572ae7ffd4f999f87f80789 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 909dd6affb55d8b542927f5b100dbc07e4d44600
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:20 2015 +0200
sticky
Message-Id: <1433754079-10395-1-git-send-email-gbenson@redhat.com>
Philippe Waroquiers wrote:
> On Fri, 2015-06-05 at 12:22 +0100, Gary Benson wrote:
> > Built and regtested on RHEL6.6 x86_64.
> I tested with the last SVN version of the Valgrind gdbserver (that
> supports qXfer:exec-file:read+).
>
> The patch introduces a regression:
> with the patch, GDB does not anymore automatically load the
> exec-file.
>
> I bypassed this problem by ignoring fake_pid_p in remote.c:
> --- a/gdb/remote.c
> +++ b/gdb/remote.c
> @@ -1624,9 +1624,13 @@ remote_add_inferior (int fake_pid_p, int pid, int
> attached,
> inf->attach_flag = attached;
> inf->fake_pid_p = fake_pid_p;
>
> - /* If no main executable is currently open then attempt to
> - open the file that was executed to create this inferior. */
> - if (try_open_exec && get_exec_file (0) == NULL)
> + /* Attempt to open the file that was executed to create this
> + inferior. If the user has explicitly specified executable
> + and/or symbol files then warn the user if their choices do
> + not match. Otherwise, set exec_file and symfile_objfile to
> + the new file. */
> + printf("fake_pid_p %d\n", fake_pid_p);
> + if (try_open_exec)// && !fake_pid_p)
> exec_file_locate_attach (pid, 1);
>
> Effectively, the printf shows that with Valgrind gdbsrv,
> fake_pid_p value is 1.
>
> When ignoring fake_pid_p, GDB can properly attach
> to different Valgrind gdbsrv, and changes of executable
> as expected.
Ah, it seems I mailed a bad patch, my apologies! I was working on
two fixes that touched the same line, and it looks like I rebased
them in the wrong order.
This updated patch has been created against the latest gdb/master
(80fb91378c91a8239817a5ab2b1c3e346109db25). Could you please try
your tests again?
Thanks,
Gary
---
On attach, GDB will only attempt to determine the main executable's
filename if one is not already set. This causes problems if you
attach to one process and then attach to another: GDB will not attempt
to discover the main executable on the second attach. If the two
processes have different main executable files then the symbols will
now be wrong. This is PR gdb/17626.
In GDB some filenames are supplied by the user (e.g. using the "file"
or "symbol-file" commands) and some are determined by GDB (e.g. while
processing an "attach" command). This commit updates GDB to track
which filenames were supplied by the user. When GDB might attempt to
determine an executable filename and one is already set, filenames
determined by GDB may be overridden but user-supplied filenames will
not.
gdb/ChangeLog:
PR gdb/17626
* progspace.h (struct program_space)
<pspace_exec_file_is_user_supplied>: New field.
<symfile_object_file_is_user_supplied>: Likewise.
(symfile_objfile_is_user_supplied): New macro.
* exec.h (exec_file_is_user_supplied): Likewise.
* exec.c (exec_close): Clear exec_file_is_user_supplied.
(exec_file_locate_attach): Remove get_exec_file check.
Do not replace user-supplied executable or symbol files.
Warn if user-supplied executable or symbol files do not
match discovered file.
(exec_file_command): Set exec_file_is_user_supplied.
* symfile.c (symbol_file_clear): Clear
symfile_objfile_is_user_supplied.
(symbol_file_command): Set symfile_objfile_is_user_supplied.
* inferior.c (add_inferior_command): Set
exec_file_is_user_supplied and symfile_objfile_is_user_supplied.
* main.c (captured_main): Likewise.
* infcmd.c (attach_command_post_wait): Always call
exec_file_locate_attach. Only call reopen_exec_file and
reread_symbols if exec_file_is_user_supplied.
* remote.c (remote_add_inferior): Remove get_exec_file check
around exec_file_locate_attach.
commit dd1f9111db27e548ba5ee806cf5bf973d9186462
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:19 2015 +0200
mainbuildid
commit 49a92823038b0c4d2045324cfd1cffef7ba9208f
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:19 2015 +0200
hexallocate
commit 22fc794dee30a61629efb52ab01128794838d9cd
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:19 2015 +0200
locatetest
commit 3c4181a65e97fb1b06f2b79943b8164831526352
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:19 2015 +0200
Tests for validate symbol file using build-id
New testcase.
gdb/testsuite/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Tests for validate symbol file using build-id.
* gdb.base/solib-mismatch-lib.c: New file.
* gdb.base/solib-mismatch-libmod.c: New file.
* gdb.base/solib-mismatch.c: New file.
* gdb.base/solib-mismatch.exp: New file.
commit 85e797c9c96085b1185ef56960aeb78152104929
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:18 2015 +0200
buildidwarn
commit 6f6952ad4d8a960c4dff7227c17da8e847dd934f
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:18 2015 +0200
buildidsolibbfdopen
commit a9e8f9276e9e885514976e32b2fc35eb948a06a3
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:18 2015 +0200
buildidverify
commit 891ddd140494720c0d377e93dbdf7d38ae9e87eb
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:18 2015 +0200
buildidsolibsearch
commit cde2f3a7d920f20b13bb61829802634d3aceaca9
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:18 2015 +0200
buildidtofile
commit 52ae466c4eae8e2e57d9dc59fce60ca6c6795693
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:17 2015 +0200
buildidproto
commit 8359c2e7189922a91d9621e297189f3cbf3295aa
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:17 2015 +0200
buildidtobfd
commit 46b1c839077b938af4ee1c22b10fc5609700324a
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:17 2015 +0200
buildidforcemove
commit 05cdf191ff60a5c977b14e2d338bf005e89ff104
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:17 2015 +0200
buildidfreefix
commit 64cf1545812f341132c7bb4faad5f2938f4c931d
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:16 2015 +0200
openpsymfile
commit 439ef35c5653d3a9724502ec1ad6662b1273fdb7
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:16 2015 +0200
openpsolib
commit 6bc4d3b31dbfa2996a329a350664a9eef4e2fe15
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:16 2015 +0200
openp
commit bfde840e829396b99837812d568e945632ab49ff
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:16 2015 +0200
filelib
commit ae70d8fa734033d1e197a8ce21bc82c393e9bfdd
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:15 2015 +0200
openfromtargetdoclose
commit 8f6abda46262ef44b8f448be3643ea502288f3ee
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:15 2015 +0200
openfromtargetfd
commit 3eaf8395d993ffd039863c5d61f77c59b27cdd4b
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:15 2015 +0200
openfromtarget
commit 629f7538f1c705deefe237b87153597e8bf6b4b1
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:14 2015 +0200
openpnullpathname
commit fb1352c863ab57bef975d9826efb4de0a7a49e63
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:14 2015 +0200
openpmode
commit e655914ce35a288d78848a6126b911e874d0f23e
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:14 2015 +0200
openppath
commit 02f3bfabeb4b3d8aefc23c5e0a7e9229c2da0c1a
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:13 2015 +0200
openpenum
commit 90721dfec76d65d29ac5fbf49c5718bd850abe41
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:13 2015 +0200
sysrootdefault
commit ce4a423657022eb9dca3552b287e8db3a8bae5de
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:13 2015 +0200
sysrootdelim
commit 208dacff86eca30c3f5990905f66f18e19ffbb57
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:12 2015 +0200
sysrootconst
commit b5d50914f4202b1f15df5e6c1b4868726dc5f43c
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:12 2015 +0200
Validate symbol file using build-id
Consumer part of the "build-id" attribute.
gdb/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
Validate symbol file using build-id.
* NEWS (Changes since GDB 7.10): Add 'set validate-build-id'
and 'show validate-build-id'. Add build-id attribute.
* solib-darwin.c (_initialize_darwin_solib): Assign validate value.
* solib-dsbt.c (_initialize_dsbt_solib): Ditto.
* solib-frv.c (_initialize_frv_solib): Ditto.
* solib-spu.c (set_spu_solib_ops): Ditto.
* solib-svr4.c: Include rsp-low.h.
(NOTE_GNU_BUILD_ID_NAME): New define.
(svr4_validate): New function.
(svr4_copy_library_list): Duplicate field build_id.
(library_list_start_library): Parse 'build-id' attribute.
(svr4_library_attributes): Add 'build-id' attribute.
(_initialize_svr4_solib): Assign validate value.
* solib-target.c (solib.h): Include.
(_initialize_solib_target): Assign validate value.
* solib.c (validate_build_id, show_validate_build_id): New.
(solib_map_sections): Use ops->validate.
(clear_so): Free build_id.
(default_solib_validate): New function.
(_initialize_solib): Add "validate-build-id".
* solib.h (default_solib_validate): New declaration.
* solist.h (struct so_list): New fields 'build_idsz' and 'build_id'.
(target_so_ops): New field 'validate'.
gdb/doc/ChangeLog
2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.texinfo (Files): Add 'set validate-build-id'
and 'show validate-build-id'.
commit bce282542cdcc386678a05f66a3aae1cac40f39d
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:12 2015 +0200
gdbserver build-id attribute generator
Producer part of the new "build-id" XML attribute.
gdb/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
gdbserver build-id attribute generator.
* features/library-list-svr4.dtd (library-list-svr4): New
'build-id' attribute.
gdb/doc/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
gdbserver build-id attribute generator.
* gdb.texinfo (Library List Format for SVR4 Targets): Add
'build-id' in description, example, new attribute in dtd.
gdb/gdbserver/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
gdbserver build-id attribute generator.
* linux-low.c (linux-maps.h, search.h, rsp-low.h): Include.
(ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
(ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
(find_phdr): New.
(get_dynamic): Use find_pdhr to traverse program headers.
(struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
(compare_mapping_entry_range, struct find_memory_region_callback_data)
(read_build_id, find_memory_region_callback, lrfind_mapping_entry)
(get_hex_build_id): New.
(linux_qxfer_libraries_svr4): Add optional build-id attribute
to reply XML document.
commit 88e1a37952d639ba05a92032e3a0d94ab466bed4
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:11 2015 +0200
Move linux_find_memory_regions_full & co.
This should be just a move with no changes.
gdb/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
Move linux_find_memory_regions_full & co.
* linux-tdep.c (linux-maps.h): Include.
(gdb_regex.h): Remove the include.
(enum filterflags, struct smaps_vmflags, read_mapping, decode_vmflags)
(mapping_is_anonymous_p, dump_mapping_p): Moved to common/linux-maps.c.
(linux_find_memory_region_ftype): Moved typedef to common/linux-maps.h.
(linux_find_memory_regions_full): Moved definition to
common/linux-maps.c.
* common/linux-maps.c: Include ctype.h, target/target-utils.h,
gdb_regex.h and target/target.h.
(struct smaps_vmflags, read_mapping, decode_vmflags)
(mapping_is_anonymous_p, dump_mapping_p): Move from linux-tdep.c.
(linux_find_memory_regions_full): Move from linux-tdep.c.
* common/linux-maps.h (read_mapping): New declaration.
(linux_find_memory_region_ftype, enum filterflags): Moved from
linux-tdep.c.
(linux_find_memory_regions_full): New declaration.
* target.c (target/target-utils.h): Include.
(read_alloc_pread_ftype): Moved typedef to target/target-utils.h.
(read_alloc, read_stralloc_func_ftype, read_stralloc): Moved
definitions to target/target-utils.c.
* target.h (target_fileio_read_stralloc): Move it to target/target.h.
* target/target-utils.c (read_alloc, read_stralloc): Move definitions
from target.c.
* target/target-utils.h (read_alloc_pread_ftype): New typedef.
(read_alloc): New declaration.
(read_stralloc_func_ftype): New typedef.
(read_stralloc): New declaration.
* target/target.h (target_fileio_read_stralloc): Move it from target.h.
gdb/gdbserver/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
* target.c: Include target/target-utils.h and fcntl.h.
(target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
(target_fileio_read_stralloc): New functions.
commit f8688948e2ef7e8ccc1899ab34a824d9904ef469
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:11 2015 +0200
Prepare linux_find_memory_regions_full & co. for move
Prepare code for move into gdb/common/.
gdb/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
Prepare linux_find_memory_regions_full & co. for move.
* linux-tdep.c (linux_find_memory_region_ftype): Comment.
(linux_find_memory_regions_full): Change signature and prepare
for moving to linux-maps.
(linux_find_memory_regions_data): Rename field 'obfd' to 'data'.
(linux_find_memory_regions_thunk): New.
(linux_find_memory_regions_thunk): Use 'data' field instead of 'obfd'.
(linux_find_memory_regions_gdb): New.
(linux_find_memory_regions): Rename argument 'obfd' to 'func_data'.
(linux_make_mappings_corefile_notes): Use
linux_find_memory_regions_gdb.
* target.c (read_alloc_pread_ftype): New typedef.
(target_fileio_read_alloc_1_pread): New function.
(read_alloc): Refactor from target_fileio_read_alloc_1.
(read_stralloc_func_ftype): New typedef.
(target_fileio_read_alloc_1): New implementation. Use read_alloc.
(read_stralloc): Refactored from target_fileio_read_stralloc.
(target_fileio_read_stralloc): New implementation, use read_stralloc.
commit 257ed7ddfe7b6eeccc1782ed3b6c5a8e1a10e951
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:11 2015 +0200
Move gdb_regex* to common/
Later patches need regex support also in gdbserver.
gdb/ChangeLog
2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
* Makefile.in (HFILES_NO_SRCDIR): Change gdb_regex.h to
common/gdb_regex.h.
(COMMON_OBS): Add gdb_regex.o.
(gdb_regex.o): New.
* common/common.m4 (GDB_AC_COMMON): Add gdb_use_included_regex,
--without-included-regex and USE_INCLUDED_REGEX.
* common/gdb_regex.c: New file from utils.c functions.
* common/gdb_regex.h: Move it here from gdb_regex.h, update include
file wrapping define name.
* configure: Rebuilt.
* configure.ac (gdb_use_included_regex, --without-included-regex)
(USE_INCLUDED_REGEX): Move them to common/common.m4.
* gdb_regex.h: Move it to common/gdb_regex.h.
* utils.c: Remove include gdb_regex.h.
(do_regfree_cleanup, make_regfree_cleanup, get_regcomp_error)
(compile_rx_or_error): Move them to common/gdb_regex.c.
gdb/gdbserver/ChangeLog
2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
* Makefile.in (OBS): Add gdb_regex.o.
(gdb_regex.o): New.
* config.in: Rebuilt.
* configure: Rebuilt.
commit 7a460e688c25393f8bde0d9ee51be0475e40b169
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Aug 13 16:17:10 2015 +0200
Create empty common/linux-maps.[ch] and common/target-utils.[ch]
Prepare new files for later move.
gdb/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
Create empty common/linux-maps.[ch] and common/target-utils.[ch].
* Makefile.in (ALL_TARGET_OBS): Add linux-maps.o.
(HFILES_NO_SRCDIR); Add common/linux-maps.h,
common/target-utils.h.
(COMMON_OBS): Add target-utils.o.
(linux-maps.o, target-utils.o): New.
* target/target-utils.c: New file.
* target/target-utils.h: New file.
* common/linux-maps.c: New file.
* common/linux-maps.h: New file.
* configure.tgt (aarch64*-*-linux*, alpha*-*-linux*)
(am33_2.0*-*-linux*, arm*-*-linux*, bfin-*-*linux*, cris*, frv-*-*)
(hppa*-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
(m68*-*-linux*, microblaze*-linux-*, microblaze*-*-linux*)
(mips*-*-linux*, nios2*-*-linux*, powerpc*-*-linux*, s390*-*-linux*)
(sh*-*-linux*, sparc-*-linux*, sparc64-*-linux*, tic6x-*-*linux)
(tilegx-*-linux*, x86_64-*-linux*, xtensa*-*-linux*): Add linux-maps.o
to gdb_target_obs.
gdb/gdbserver/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
Create empty common/linux-maps.[ch] and common/target-utils.[ch].
* Makefile.in (OBS): Add target-utils.o.
(linux-maps.o, target-utils.o): New.
* configure.srv (srv_linux_obj): Add linux-maps.o.
commit 8efa2874ab298f3923f4127340da119435f87c39
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Aug 13 04:31:38 2015 -0700
Issue an error for read-only segment with dynamic IFUNC relocations
To load an ELF binary with DT_TEXTREL tag, the dynamic linker calls
__mprotect on the read-only segment with PROT_READ|PROT_WRITE before
applying dynamic relocation. It leads to segfault when performing
IFUNC relocations since the read-only segment has no execute permission.
This patch changes x86 linker to issue an error for read-only segment
with dynamic IFUNC relocations. Other backends with IFUNC support
may need a similar change.
bfd/
PR ld/18801
* elf32-i386.c (elf_i386_size_dynamic_sections): Issue an error
for read-only segment with dynamic IFUNC relocations.
* elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
ld/testsuite/
PR ld/18801
* ld-i386/i386.exp: Run pr18801.
* ld-x86-64/x86-64.exp: Likewise.
* ld-i386/pr18801.d: New file.
* ld-i386/pr18801.s: Likewise.
* ld-x86-64/pr18801.d: Likewise.
* ld-x86-64/pr18801.s: Likewise.
commit 4ab90a7a90ccf8a671f139c1c6387ba8028e6011
Author: Andre Vieira <andre.simoesdiasvieira@arm.com>
Date: Thu Aug 13 11:39:08 2015 +0100
Fixes for unpredictable nops and 26-bit versions of teq,tst,cmn,cmp.
opcodes * arm-dis.c (print_insn_arm): Disassembling for all targets V6
and higher with ARM instruction set will now mark the 26-bit
versions of teq,tst,cmn and cmp as UNPREDICTABLE.
(arm_opcodes): Fix for unpredictable nop being recognized as a teq.
test * gas/arm/nops.d: New.
* gas/arm/nops.s: New.
* gas/arm/inst.d: Changed expectation file for 26-bit teq,
tst, cmn and cmp.
commit e5a764c49c138d9409a807698d853225a4c8351f
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Aug 13 02:48:55 2015 -0700
Add ChangeLog for check_ifunc_attribute_available
commit 5d8c3ed327fff9993d89ab8b35e2cbae67e2a51e
Author: Pierre-Marie de Rodat <derodat@adacore.com>
Date: Thu Aug 13 09:54:09 2015 +0200
Add ChangeLog entries for the previous commit
commit 22cee43f9af76fc4c10c3d4018a9ada6d7c5c1a5
Author: Pierre-Marie de Rodat <derodat@adacore.com>
Date: Wed Jul 22 15:30:57 2015 +0200
[Ada] Add support for subprogram renamings
Consider the following declaration:
function Foo (I : Integer) return Integer renames Pack.Bar;
As Foo is not materialized as a routine whose name is derived from Foo,
GDB currently cannot use it:
(gdb) print foo(0)
No definition of "foo" in current context.
However, compilers can emit DW_TAG_imported_declaration in order to
materialize the fact that Foo is actually another name for Pack.Bar.
This commit enhances the DWARF reader to record global renamings (it
used to put global ones in a static block) and enhances the Ada engine
to leverage this information during symbol lookup.
gdb/ChangeLog:
* ada-lang.c: Include namespace.h
(aux_add_nonlocal_symbols): Fix a function name in comment.
(ada_add_block_renamings): New.
(add_nonlocal_symbols): Add global renamings handling.
(ada_lookup_symbol_list_worker): Move the symbol lookup part
to...
(ada_add_all_symbols): ... this new function.
(ada_add_block_symbols): Try to match the input name against the
"using directives list", perform a recursive symbol lookup on
the matched declarations.
* block.h (struct block): Move the_namespace to top-level as
namespace_info. Remove the language_specific field.
(BLOCK_NAMESPACE): Update access to the namespace_info field.
* buildsym.h (using_directives): Rename into...
(local_using_directives): ... this.
(global_using_directives): New.
(struct context_stack): Rename the using_directives field into
local_using_directives.
* buildsym.c (finish_block_internal): Deal with the proper
using directives repository (local or global).
(prepare_for_building): Reset local_using_directives. Assert
that there is no pending global using directive.
(reset_symtab_globals): Reset global_using_directives and
local_using_directives.
(end_symtab_get_static_block): Don't ignore symtabs that have
only using directives.
(push_context): Update references to local_using_directives.
(buildsym_init): Do not reset using_directives.
* cp-support.c: Include namespace.h.
* cp-support.h (struct using_direct): Move to namespace.h.
(cp_add_using_directives): Move to namespace.h.
* cp-namespace.c: Include namespace.h
(cp_add_using_directive): Move to namespace.c, rename it to
add_using_directive, add a "using_directives" argument and use
it as the pending using directives repository. All callers
updated.
* dwarf2read.c (using_directives): New.
(read_import_statement): Call using_directives.
(read_func_scope): Update references to local_using_directives.
(read_lexical_block_scope): Likewise.
(read_namespace): Update the heading comment, call
using_directives.
* namespace.h: New file.
* namespace.c: New file.
* Makefile.in (SFILES): Add namespace.c.
(COMMON_OBS): Add namespace.o
gdb/testsuite/ChangeLog:
* gdb.ada/fun_renaming.exp: New testcase.
* gdb.ada/fun_renaming/fun_renaming.adb: New file.
* gdb.ada/fun_renaming/pack.adb: New file.
* gdb.ada/fun_renaming/pack.ads: New file.
Tested on x86_64-linux. Support for this in GCC is in the pipeline: see
<https://gcc.gnu.org/ml/gcc-patches/2015-07/msg02166.html>.
commit 19c2883a9b92e2be695368e19788fd0210d732d4
Author: Alan Modra <amodra@gmail.com>
Date: Thu Aug 13 15:57:15 2015 +0930
gas 0f handling
_start:
.byte 0f-_start
0:
Fixes
..:2: Error: floating point number invalid
..:2: Error: junk at end of line, first unrecognized character is `_'
* expr.c (operand): Rewrite handling of operands starting with "0f".
If atof_generic only parses "-" or "+", treat as expression.
commit c14c7a8a619ce03a7c8f41d1cfac3af728df453b
Author: Alan Modra <amodra@gmail.com>
Date: Thu Aug 13 15:55:31 2015 +0930
gas 0b vs 0b0 vs 00b
* expr.c (integer_constant): Return O_absent expression if eol.
(operand): For targets with both LOCAL_LABELS_FB and
NUMBERS_WITH_SUFFIX set, treat "0b" not followed by binary
digits as a local label reference. Correct handling of 0b prefix.
If a suffix is not allowed, error on 0B.
commit 9791c250490d7c3c961860419e4436c758a91a21
Author: Alan Modra <amodra@gmail.com>
Date: Thu Aug 13 15:51:51 2015 +0930
Correct local label doc
* doc/as.texinfo (Local Labels): Allowed range of N in local
labels is non-negative integers, not positive integers.
commit ea8812bceab054cab438bb51916f1d81118811b3
Author: Keith Seitz <keiths@redhat.com>
Date: Wed Aug 12 18:31:11 2015 -0700
gdb.base/dso2dso.exp sometimes broken
Keith reported that gdb.base/dso2dso.exp is broken, with the following
error:
| $ make check RUNTESTFLAGS=dso2dso.exp
| [snip]
| Running ../../../src/gdb/testsuite/gdb.base/dso2dso.exp ...
| ERROR: tcl error sourcing ../../../src/gdb/testsuite/gdb.base/dso2dso.exp.
| ERROR: couldn't open
| "../../../src/gdb/testsuite/gdb.base/../../../src/gdb/testsuite/gdb.base/dso2dso-dso1.c":
| no such file or directory
| while executing
| "error "$message""
| (procedure "gdb_get_line_number" line 14)
| invoked from within
| "gdb_get_line_number "STOP HERE" $srcfile_libdso1"
| (file "../../../src/gdb/testsuite/gdb.base/dso2dso.exp" line 60)
| invoked from within
| "source ../../../src/gdb/testsuite/gdb.base/dso2dso.exp"
| ("uplevel" body line 1)
| invoked from within
| "uplevel #0 source ../../../src/gdb/testsuite/gdb.base/dso2dso.exp"
| invoked from within
| "catch "uplevel #0 source $test_file_name""
This happens because gdb_get_line_number will prepend $srcdir/$subdir
if the given filename does not start with "/", and this happens when
GDB was configured using a relative path to the configure script.
When using an absolute path like I do, we avoid the pre-pending that
Keith is seeing.
gdb/testsuite/ChangeLog:
Keith Seitz <keiths@redhat.com>:
* gdb.base/dso2dso.exp: Pass basename of source file in call
to gdb_get_line_number.
Tested on x86_64-linux with both scenarios.
commit c74e78b36ce4904b733e6fa7e295fd4b15ac0596
Author: GDB Administrator <gdbadmin@sourceware.org>
Date: Thu Aug 13 00:00:08 2015 +0000
Automatic date update in version.in
commit 13a2df29c930eda49837741902b67021ab004990
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Aug 12 13:31:29 2015 -0700
Set EI_OSABI to ELFOSABI_GNU for local IFUNC symbols
Since the backend elf_add_symbol_hook isn't called on local symbols,
the EI_OSABI field isn't to ELFOSABI_GNU where are local IFUNC symbols.
This patch changes the x86 backends to set has_gnu_symbols if there are
relocations against IFUNC symbols. Other backends with IFUNC support
may need a similar change.
This patch also changes the type of has_gnu_symbols from bfd_boolean to
enum elf_gnu_symbols.
bfd/
PR ld/18815
* elf-bfd.h (elf_gnu_symbols): New enum.
(elf_obj_tdata): Use elf_gnu_symbols on has_gnu_symbols.
* elf-s390-common.c (elf_s390_add_symbol_hook): Set
has_gnu_symbols to elf_gnu_symbol_any.
* elf32-arm.c (elf32_arm_add_symbol_hook): Likewise.
* elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
* elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
* elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
* elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
* elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
* lfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
* elf32-i386.c (elf_i386_check_relocs): Update has_gnu_symbols
if there are relocations against IFUNC symbols.
(elf_i386_add_symbol_hook): Don't check STT_GNU_IFUNC here.
* elf64-x86-64. (elf_x86_64_check_relocs): Update has_gnu_symbols
if there are relocations against IFUNC symbols.
(elf_x86_64_add_symbol_hook): Don't check STT_GNU_IFUNC here.
ld/testsuite/
PR ld/18815
* ld-i386/i386.exp: Run pr18815.
* ld-x86-64/x86-64.exp: Likewise.
* ld-i386/pr18815.d: New file.
* ld-i386/pr18815.s: Likewise.
* ld-x86-64/pr18815.d: Likewise.
* ld-x86-64/pr18815.s: Likewise.
commit 4dafcdeb1341c4dd1a4641373bc17aab3ef2e788
Author: Joel Brobecker <brobecker@adacore.com>
Date: Wed Aug 12 09:33:19 2015 -0700
[amd64] Invalid return address after displaced stepping
Making all-stop run on top of non-stop caused a small regression
in behavior. This was observed on x86_64-linux. The attached testcase
is in C whereas the investigation was done with an Ada program,
but it's the same scenario, and using a C testcase allows wider testing.
Basically: I am debugging a single-threaded program, and currently
stopped inside a function provided by a shared-library, at a line
calling a subprogram provided by a second shared library, and trying
to "next" over that function call.
Before we changed the default all-stop behavior, we had:
7 Impl_Initialize; -- Stop here and try "next" over this line
(gdb) n
8 return 5; <<-- OK
But now, "next" just stops much earlier:
(gdb) n
0x00007ffff7bd8560 in impl.initialize@plt () from /[...]/lib/libpck.so
What happens is that next stops at a call instruction, which calls
the function's PLT, and GDB fails to notice that the inferior stepped
into a subroutine, and so decides that we're done. We can see another
symptom of the same issue by looking at the backtrace at the point
GDB stopped:
(gdb) bt
#0 0x00007ffff7bd8560 in impl.initialize@plt ()
from /[...]/lib/libpck.so
#1 0x00000000f7bd86f9 in ?? ()
#2 0x00007fffffffdf50 in ?? ()
#3 0x0000000000401893 in a () at /[...]/a.adb:7
Backtrace stopped: frame did not save the PC
With a functioning GDB, the backtrace looks like the following instead:
#0 0x00007ffff7bd8560 in impl.initialize@plt ()
from /[...]/lib/libpck.so
#1 0x00007ffff7bd86f9 in sub () at /[...]/pck.adb:7
#2 0x0000000000401893 in a () at /[...]/a.adb:7
Note how, for frame #1, the address looks quite similar, except
for the high-order bits not being set:
#1 0x00007ffff7bd86f9 in sub () at /[...]/pck.adb:7 <<<-- OK
#1 0x00000000f7bd86f9 in ?? () <<<-- WRONG
^^^^
||||
Wrong
Investigating this further led me to displaced stepping.
As we are "next"-ing from a location where a breakpoint is inserted,
we need to step out of it, and since we're on non-stop mode, we need
to do it using displaced stepping. And looking at
amd64-tdep.c:amd64_displaced_step_fixup, I found the code that handles
the return address:
regcache_cooked_read_unsigned (regs, AMD64_RSP_REGNUM, &rsp);
retaddr = read_memory_unsigned_integer (rsp, retaddr_len, byte_order);
retaddr = (retaddr - insn_offset) & 0xffffffffUL;
The mask used to compute retaddr looks wrong to me, keeping only
4 bytes instead of 8, and explains why the high order bits of
the backtrace are unset. What happens is that, after the displaced
stepping has completed, GDB restores that return address at the location
where the program expects it. But because the top half bits of
the address have been masked out, the return address is now invalid.
The incorrect behavior of the "next" command and the backtrace at
that location are the first symptoms of that. Another symptom is
that this actually alters the behavior of the program, where a "cont"
from there soon leads to a SEGV when the inferior tries to jump back
to that incorrect return address:
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x00000000f7bd86f9 in ?? ()
^^^^^^^^^^^^^^^^^^
This patch fixes the issue by using a mask that seems more appropriate
for this architecture.
gdb/ChangeLog:
* amd64-tdep.c (amd64_displaced_step_fixup): Fix the mask used to
compute RETADDR.
gdb/testsuite/ChangeLog:
* gdb.base/dso2dso-dso2.c, gdb.base/dso2dso-dso2.h,
gdb.base/dso2dso-dso1.c, gdb.base/dso2dso-dso1.h, gdb.base/dso2dso.c,
gdb.base/dso2dso.exp: New files.
Tested on x86_64-linux, no regression.
commit 59ecaff36145add82c315ba7a008c4a5db4a6f51
Author: Keith Seitz <keiths@redhat.com>
Date: Wed Aug 12 11:31:24 2015 -0700
Initialize `location' in gdbpy_decode_line
BuildBot flagged an uninitialized variable coming from one of the patches
in my recently committed locations/explicit patchset.
The following patch fixes this.
gdb/ChangeLog
* python/python.c (gdbpy_decode_line): Initialize `location' to NULL
and only call decode_line_1 when it is non-NULL.
diff --git a/gdb/python/python.c b/gdb/python/python.c
index c28f98b..14da62c 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -730,7 +730,7 @@ gdbpy_decode_line (PyObject *self, PyObject *args)
PyObject *result = NULL;
PyObject *return_result = NULL;
PyObject *unparsed = NULL;
- struct event_location *location;
+ struct event_location *location = NULL;
if (! PyArg_ParseTuple (args, "|s", &arg))
return NULL;
@@ -747,7 +747,7 @@ gdbpy_decode_line (PyObject *self, PyObject *args)
TRY
{
- if (arg)
+ if (location != NULL)
sals = decode_line_1 (location, 0, 0, 0);
else
{
commit b46824bd49648c575372e6d9bc6a6defeabd6ed5
Author: Max Filippov <jcmvbkbc@gmail.com>
Date: Wed Jul 29 17:42:54 2015 +0300
xtensa: add --auto-litpools option
Auto-litpools is the automated version of text-section-literals: literal
pool candidate frags are planted every N frags and during relaxation
they are turned into actual literal pools where literals are moved to
become reachable for their first reference by L32R instruction.
2015-08-12 David Weatherford <weath@cadence.com>
gas/
* config/tc-xtensa.c (struct litpool_frag, struct litpool_seg):
New structures.
(xtensa_maybe_create_literal_pool_frag): New function.
(litpool_seg_list, auto_litpools, auto_litpool_limit)
(litpool_buf, litpool_slotbuf): New static variables.
(option_auto_litpools, option_no_auto_litpools)
(option_auto_litpool_limit): New enum identifiers.
(md_longopts): Add entries for auto-litpools, no-auto-litpools
and auto-litpool-limit.
(md_parse_option): Handle option_auto_litpools,
option_no_auto_litpools and option_auto_litpool_limit.
(md_show_usage): Add help for --[no-]auto-litpools and
--auto-litpool-limit.
(xtensa_mark_literal_pool_location): Record a place for literal
pool with a call to xtensa_maybe_create_literal_pool_frag.
(get_literal_pool_location): Find highest priority literal pool
or convert candidate to literal pool when auto-litpools are used.
(xg_assemble_vliw_tokens): Create literal pool after jump
instruction.
(xtensa_check_frag_count): Create candidate literal pool every
auto_litpool_limit frags.
(xtensa_relax_frag): Add jump around literals to non-empty
literal pool.
(xtensa_move_literals): Estimate literal pool addresses and move
unreachable literals closer to their users, converting candidate
to literal pool if needed.
(xtensa_switch_to_non_abs_literal_fragment): Only emit error
about missing .literal_position in case auto-litpools are not
used.
* config/tc-xtensa.h (xtensa_relax_statesE): New relaxation
state: RELAX_LITERAL_POOL_CANDIDATE_BEGIN.
* doc/as.texinfo (Xtensa options): Document --auto-litpools and
--no-auto-litpools options.
* doc/c-xtensa.texi (Xtensa options): Likewise.
2015-08-12 Max Filippov <jcmvbkbc@gmail.com>
gas/testsuite/
* gas/xtensa/all.exp: Add auto-litpools to the list of xtensa
tests.
* gas/xtensa/auto-litpools.s: New file: auto-litpools test.
* gas/xtensa/auto-litpools.s: New file: auto-litpools test
result pattern.
commit 5ba325978c354b9f0e238864e3afb4f9b528c04e
Author: Sergio Durigan Junior <sergiodj@redhat.com>
Date: Wed Aug 12 12:32:16 2015 -0400
Guarantee save-and-restore of GDBFLAGS on gdb.base/checkpoint-ns.exp
Keith found out that several tests were failing when testing the
native-gdbserver board on Fedora (x86_64). Strangely, these failures
had not been reported by our BuildBot. Later, he found that the reason
for this was because the failures only happened when running the
testsuite without FORCE_PARALLEL (i.e., on serial mode; maybe it would
be worth having a builder testing things on serial...). Then, he
decided to start bisecting the changes to see which one introduced the
failure (it was not trivial to know this only by looking at gdb.log).
After a lot of time, he found that Pedro's commit
e1316e60d4d1fe406efc6e7536b2bdb43733e9d2 was the culprit. There was
nothing wrong in the code, but the new gdb.base/checkpoint-ns.exp
testcase did something that left the GDBFLAGS variable in an
inconsistent state. This test works by modifying this variable to set
non-stop on, sourcing gdb.base/checkpoint.exp (which does the hard
work), and then restoring the old value on GDBFLAGS. However, this was
not working because gdb.base/checkpoint.exp bails out if it is being
tested on gdbserver, and when it calls "continue" the control goes back
to the function calling the tests, and not to
gdb.base/checkpoint-ns.exp.
The fix is simple: just wrap the "source" call, and make
gdb.base/checkpoint-ns.exp aware of the "continue"/"return" calls made
by gdb.base/checkpoint.exp.
gdb/testsuite/ChangeLog:
2015-08-12 Sergio Durigan Junior <sergiodj@redhat.com>
Pedro Alves <palves@redhat.com>
Keith Seitz <keiths@redhat.com>
* gdb.base/checkpoint-ns.exp: Use save_vars to save and restore
GDBFLAGS.
commit 40fc1451c63d21a1448bb21e39a7b70ecb959213
Author: Simon Dardis <simon.dardis@imgtec.com>
Date: Wed Aug 12 17:06:35 2015 +0100
[MIPS] Map 'move' to 'or'.
The MIPS assembly idiom 'move' now maps to the 'or' machine instruction. This
change affects microMIPS, MIPS32, MIPS64.
2015-08-12 Simon Dardis <simon.dardis@imgtec.com>
opcodes/
* micromips-opc.c (micromips_opcodes): Re-order table so that move
based on 'or' is first.
* mips-opc.c (mips_builtin_opcodes): Ditto.
bfd/
* elfxx-mips.c (STUB_MOVE): Change to use 'or' only.
(mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry,
mips_n64_exec_plt0_entry, micromips_insn32_o32_exec_plt0_entry):
Update to use 'or' instead of 'addu/daddu'.
(_bfd_mips_elf_finish_dynamic_symbol): Update usage of STUB_MOVE.
(move_insns_32): Reorder table.
gas/
* config/tc-mips.c (move_register): Change to use 'or' only.
(s_cpload, s_cpsetup, s_cprestore, s_cpreturn): Update to
use or for move.
gas/testsuite/
* gas/mips/elf-rel23.d: Update test.
* gas/mips/elf-rel23.d: Ditto.
* gas/mips/elf-rel23a.d: Ditto.
* gas/mips/elf-rel23b.d: Ditto.
* gas/mips/elf_e_flags1.d: Ditto.
* gas/mips/elf_e_flags2.d: Ditto.
* gas/mips/elf_e_flags3.d: Ditto.
* gas/mips/elf_e_flags4.d: Ditto.
* gas/mips/loc-swap-dis.d: Ditto.
* gas/mips/micromips-insn32.d: Ditto.
* gas/mips/micromips-noinsn32.d: Ditto.
* gas/mips/micromips-trap.d: Ditto.
* gas/mips/micromips.d: Ditto.
* gas/mips/mips-abi32-pic.d: Ditto.
* gas/mips/mips-abi32.d: Ditto.
* gas/mips/mips-gp32-fp32-pic.d: Ditto.
* gas/mips/mips-gp32-fp32.d: Ditto.
* gas/mips/mips-gp32-fp64-pic.d: Ditto.
* gas/mips/mips-gp32-fp64.d: Ditto.
* gas/mips/mips-gp64-fp32-pic.d: Ditto.
* gas/mips/mips-gp64-fp32.d: Ditto.
* gas/mips/mips-gp64-fp64-pic.d: Ditto.
* gas/mips/mips-gp64-fp64.d: Ditto.
* gas/mips/mipsr6@loc-swap-dis.d: Ditto.
* gas/mips/tls-o32.d: Ditto.
* gas/mips/uld2-eb.d: Ditto.
* gas/mips/uld2-el.d: Ditto.
* gas/mips/ulw2-eb-ilocks.d: Ditto.
* gas/mips/ulw2-eb.d: Ditto.
* gas/mips/ulw2-el-ilocks.d: Ditto.
* gas/mips/ulw2-el.d: Ditto.
* gas/mips/move.d: New test.
* gas/mips/move.s: Ditto.
* gas/mips/micromips32-move.d: Ditto.
* gas/mips/micromips32-move.s: Ditto.
* gas/mips/mips.exp: Run the new tests.
gold/
* mips.cc (plt0_entry_o32, plt0_entry_n32, plt0_entry_n64,
lazy_stub_normal_1, lazy_stub_normal_1_n64,
lazy_stub_normal_2, lazy_stub_normal_2_n64, lazy_stub_big,
lazy_stub_big_n64, lazy_stub_micromips32_normal_1_n64,
lazy_stub_micromips32_normal_2_n64, lazy_stub_micromips32_big,
lazy_stub_micromips32_big_n64): Update to use 'or' for move instead
of 'addu/daddu'.
ld/testsuite/
* ld-mips-elf/compressed-plt-1-n32-mips16.od: Update test.
* ld-mips-elf/compressed-plt-1-n32-umips.od: Ditto.
* ld-mips-elf/compressed-plt-1-o32-mips16-got.od: Ditto.
* ld-mips-elf/compressed-plt-1-o32-mips16-only.od: Ditto.
* ld-mips-elf/compressed-plt-1-o32-mips16-word.od: Ditto.
* ld-mips-elf/compressed-plt-1-o32-mips16.od: Ditto.
* ld-mips-elf/compressed-plt-1-o32-se.od: Ditto.
* ld-mips-elf/compressed-plt-1-o32-umips-got.od: Ditto.
* ld-mips-elf/compressed-plt-1-o32-umips-word.od: Ditto.
* ld-mips-elf/compressed-plt-1-o32-umips.od: Ditto.
* ld-mips-elf/jalx-2.dd: Ditto.
* ld-mips-elf/mips16-pic-3.dd: Ditto.
* ld-mips-elf/pic-and-nonpic-3a.dd: Ditto.
* ld-mips-elf/pic-and-nonpic-3b.dd: Ditto.
* ld-mips-elf/pic-and-nonpic-5b.dd: Ditto.
* ld-mips-elf/pic-and-nonpic-6-n32.dd: Ditto.
* ld-mips-elf/pic-and-nonpic-6-o32.dd: Ditto.
* ld-mips-elf/stub-dynsym-1-10000.d: Ditto.
* ld-mips-elf/stub-dynsym-1-2fe80.d: Ditto.
* ld-mips-elf/stub-dynsym-1-7fff.d: Ditto.
* ld-mips-elf/stub-dynsym-1-8000.d: Ditto.
* ld-mips-elf/stub-dynsym-1-fff0.d: Ditto.
* ld-mips-elf/tlsbin-o32.d: Ditto.
* ld-mips-elf/tlsdyn-o32-1.d: Ditto.
* ld-mips-elf/tlsdyn-o32-2.d: Ditto.
* ld-mips-elf/tlsdyn-o32-3.d: Ditto.
* ld-mips-elf/tlsdyn-o32.d: Ditto.
* ld-mips-elf/tlslib-o32.d: Ditto.
-----------------------------------------------------------------------
Summary of changes:
bfd/ChangeLog | 16 +
bfd/elf-bfd.h | 17 +-
bfd/elf-s390-common.c | 2 +-
bfd/elf32-arm.c | 2 +-
bfd/elf32-i386.c | 19 +-
bfd/elf32-m68k.c | 2 +-
bfd/elf32-ppc.c | 2 +-
bfd/elf32-sparc.c | 2 +-
bfd/elf64-ppc.c | 2 +-
bfd/elf64-sparc.c | 2 +-
bfd/elf64-x86-64.c | 19 +-
bfd/elfxx-aarch64.c | 2 +-
bfd/elfxx-mips.c | 25 +-
bfd/version.h | 2 +-
gas/ChangeLog | 62 +++
gas/config/tc-mips.c | 14 +-
gas/config/tc-xtensa.c | 432 +++++++++++++++++++-
gas/config/tc-xtensa.h | 1 +
gas/doc/as.texinfo | 13 +-
gas/doc/c-xtensa.texi | 23 +-
gas/expr.c | 107 +++---
gas/testsuite/ChangeLog | 54 +++
gas/testsuite/gas/arm/inst.d | 32 +-
gas/testsuite/gas/arm/nops.d | 12 +
gas/testsuite/gas/arm/nops.s | 4 +
gas/testsuite/gas/mips/elf-rel23.d | 2 +-
gas/testsuite/gas/mips/elf-rel23a.d | 2 +-
gas/testsuite/gas/mips/elf-rel23b.d | 2 +-
gas/testsuite/gas/mips/elf_e_flags1.d | 2 +-
gas/testsuite/gas/mips/elf_e_flags2.d | 2 +-
gas/testsuite/gas/mips/elf_e_flags3.d | 2 +-
gas/testsuite/gas/mips/elf_e_flags4.d | 2 +-
gas/testsuite/gas/mips/loc-swap-dis.d | 16 +-
gas/testsuite/gas/mips/micromips-insn32.d | 172 ++++----
gas/testsuite/gas/mips/micromips-noinsn32.d | 4 +-
gas/testsuite/gas/mips/micromips-trap.d | 4 +-
gas/testsuite/gas/mips/micromips.d | 4 +-
gas/testsuite/gas/mips/micromips32-move.d | 14 +
gas/testsuite/gas/mips/micromips32-move.s | 6 +
gas/testsuite/gas/mips/mips-abi32-pic.d | 4 +-
gas/testsuite/gas/mips/mips-abi32.d | 4 +-
gas/testsuite/gas/mips/mips-gp32-fp32-pic.d | 4 +-
gas/testsuite/gas/mips/mips-gp32-fp32.d | 4 +-
gas/testsuite/gas/mips/mips-gp32-fp64-pic.d | 4 +-
gas/testsuite/gas/mips/mips-gp32-fp64.d | 4 +-
gas/testsuite/gas/mips/mips-gp64-fp32-pic.d | 2 +-
gas/testsuite/gas/mips/mips-gp64-fp32.d | 2 +-
gas/testsuite/gas/mips/mips-gp64-fp64-pic.d | 2 +-
gas/testsuite/gas/mips/mips-gp64-fp64.d | 2 +-
gas/testsuite/gas/mips/mips.exp | 4 +
gas/testsuite/gas/mips/mipsr6@loc-swap-dis.d | 16 +-
gas/testsuite/gas/mips/move.d | 14 +
gas/testsuite/gas/mips/move.s | 4 +
gas/testsuite/gas/mips/tls-o32.d | 6 +-
gas/testsuite/gas/mips/uld2-eb.d | 8 +-
gas/testsuite/gas/mips/uld2-el.d | 8 +-
gas/testsuite/gas/mips/ulw2-eb-ilocks.d | 8 +-
gas/testsuite/gas/mips/ulw2-eb.d | 8 +-
gas/testsuite/gas/mips/ulw2-el-ilocks.d | 8 +-
gas/testsuite/gas/mips/ulw2-el.d | 9 +-
gas/testsuite/gas/xtensa/all.exp | 1 +
gas/testsuite/gas/xtensa/auto-litpools.d | 12 +
gas/testsuite/gas/xtensa/auto-litpools.s | 13 +
gdb/ChangeLog | 59 +++
gdb/Makefile.in | 3 +-
gdb/ada-lang.c | 199 +++++++---
gdb/amd64-tdep.c | 2 +-
gdb/block.h | 21 +-
gdb/build-id.c | 6 +-
gdb/build-id.h | 2 +-
gdb/buildsym.c | 24 +-
gdb/buildsym.h | 8 +-
gdb/cp-namespace.c | 102 +-----
gdb/cp-support.c | 1 +
gdb/cp-support.h | 92 +----
gdb/dwarf2read.c | 49 ++-
gdb/namespace.c | 117 ++++++
gdb/namespace.h | 118 ++++++
gdb/python/python.c | 4 +-
gdb/solib.c | 2 +-
gdb/symfile.c | 8 +-
gdb/testsuite/ChangeLog | 25 ++
gdb/testsuite/gdb.ada/fun_renaming.exp | 83 ++++
.../gdb.ada/fun_renaming/fun_renaming.adb | 23 +
gdb/testsuite/gdb.ada/fun_renaming/pack.adb | 26 ++
gdb/testsuite/gdb.ada/fun_renaming/pack.ads | 22 +
gdb/testsuite/gdb.base/checkpoint-ns.exp | 9 +-
gdb/testsuite/gdb.base/dso2dso-dso1.c | 26 ++
gdb/testsuite/gdb.base/dso2dso-dso1.h | 23 +
gdb/testsuite/gdb.base/dso2dso-dso2.c | 24 ++
gdb/testsuite/gdb.base/dso2dso-dso2.h | 23 +
gdb/testsuite/gdb.base/dso2dso.c | 25 ++
gdb/testsuite/gdb.base/dso2dso.exp | 68 +++
gold/ChangeLog | 10 +
gold/mips.cc | 32 +-
ld/testsuite/ChangeLog | 42 ++
ld/testsuite/ld-i386/i386.exp | 2 +
ld/testsuite/ld-i386/pr18801.d | 3 +
ld/testsuite/ld-i386/pr18801.s | 15 +
ld/testsuite/ld-i386/pr18815.d | 9 +
ld/testsuite/ld-i386/pr18815.s | 15 +
.../ld-mips-elf/compressed-plt-1-n32-mips16.od | 8 +-
.../ld-mips-elf/compressed-plt-1-n32-umips.od | 2 +-
.../ld-mips-elf/compressed-plt-1-o32-mips16-got.od | 2 +-
.../compressed-plt-1-o32-mips16-only.od | 4 +-
.../compressed-plt-1-o32-mips16-word.od | 2 +-
.../ld-mips-elf/compressed-plt-1-o32-mips16.od | 8 +-
.../ld-mips-elf/compressed-plt-1-o32-se.od | 4 +-
.../ld-mips-elf/compressed-plt-1-o32-umips-got.od | 2 +-
.../ld-mips-elf/compressed-plt-1-o32-umips-word.od | 2 +-
.../ld-mips-elf/compressed-plt-1-o32-umips.od | 2 +-
ld/testsuite/ld-mips-elf/jalx-2.dd | 4 +-
ld/testsuite/ld-mips-elf/mips16-pic-3.dd | 16 +-
ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.dd | 2 +-
ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.dd | 4 +-
ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.dd | 2 +-
ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.dd | 4 +-
ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.dd | 4 +-
ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.dd | 4 +-
ld/testsuite/ld-mips-elf/stub-dynsym-1-10000.d | 2 +-
ld/testsuite/ld-mips-elf/stub-dynsym-1-2fe80.d | 2 +-
ld/testsuite/ld-mips-elf/stub-dynsym-1-7fff.d | 2 +-
ld/testsuite/ld-mips-elf/stub-dynsym-1-8000.d | 2 +-
ld/testsuite/ld-mips-elf/stub-dynsym-1-fff0.d | 2 +-
ld/testsuite/ld-mips-elf/tlsbin-o32.d | 6 +-
ld/testsuite/ld-mips-elf/tlsdyn-o32-1.d | 12 +-
ld/testsuite/ld-mips-elf/tlsdyn-o32-2.d | 12 +-
ld/testsuite/ld-mips-elf/tlsdyn-o32-3.d | 12 +-
ld/testsuite/ld-mips-elf/tlsdyn-o32.d | 6 +-
ld/testsuite/ld-mips-elf/tlslib-o32.d | 8 +-
ld/testsuite/ld-x86-64/pr18801.d | 3 +
ld/testsuite/ld-x86-64/pr18801.s | 15 +
ld/testsuite/ld-x86-64/pr18815.d | 9 +
ld/testsuite/ld-x86-64/pr18815.s | 15 +
ld/testsuite/ld-x86-64/x86-64.exp | 2 +
opcodes/ChangeLog | 14 +
opcodes/arm-dis.c | 14 +-
opcodes/micromips-opc.c | 3 +-
opcodes/mips-opc.c | 2 +-
139 files changed, 2103 insertions(+), 691 deletions(-)
create mode 100644 gas/testsuite/gas/arm/nops.d
create mode 100644 gas/testsuite/gas/arm/nops.s
create mode 100644 gas/testsuite/gas/mips/micromips32-move.d
create mode 100644 gas/testsuite/gas/mips/micromips32-move.s
create mode 100644 gas/testsuite/gas/mips/move.d
create mode 100644 gas/testsuite/gas/mips/move.s
create mode 100644 gas/testsuite/gas/xtensa/auto-litpools.d
create mode 100644 gas/testsuite/gas/xtensa/auto-litpools.s
create mode 100644 gdb/namespace.c
create mode 100644 gdb/namespace.h
create mode 100644 gdb/testsuite/gdb.ada/fun_renaming.exp
create mode 100644 gdb/testsuite/gdb.ada/fun_renaming/fun_renaming.adb
create mode 100644 gdb/testsuite/gdb.ada/fun_renaming/pack.adb
create mode 100644 gdb/testsuite/gdb.ada/fun_renaming/pack.ads
create mode 100644 gdb/testsuite/gdb.base/dso2dso-dso1.c
create mode 100644 gdb/testsuite/gdb.base/dso2dso-dso1.h
create mode 100644 gdb/testsuite/gdb.base/dso2dso-dso2.c
create mode 100644 gdb/testsuite/gdb.base/dso2dso-dso2.h
create mode 100644 gdb/testsuite/gdb.base/dso2dso.c
create mode 100644 gdb/testsuite/gdb.base/dso2dso.exp
create mode 100644 ld/testsuite/ld-i386/pr18801.d
create mode 100644 ld/testsuite/ld-i386/pr18801.s
create mode 100644 ld/testsuite/ld-i386/pr18815.d
create mode 100644 ld/testsuite/ld-i386/pr18815.s
create mode 100644 ld/testsuite/ld-x86-64/pr18801.d
create mode 100644 ld/testsuite/ld-x86-64/pr18801.s
create mode 100644 ld/testsuite/ld-x86-64/pr18815.d
create mode 100644 ld/testsuite/ld-x86-64/pr18815.s
First 500 lines of diff:
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 2f850e7..9ba5902 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,19 @@
+2015-08-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/18801
+ * elf32-i386.c (elf_i386_size_dynamic_sections): Issue an error
+ for read-only segment with dynamic IFUNC relocations.
+ * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
+
+2015-08-12 Simon Dardis <simon.dardis@imgtec.com>
+
+ * elfxx-mips.c (STUB_MOVE): Change to use 'or' only.
+ (mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry,
+ mips_n64_exec_plt0_entry, micromips_insn32_o32_exec_plt0_entry):
+ Update to use 'or' instead of 'addu/daddu'.
+ (_bfd_mips_elf_finish_dynamic_symbol): Update usage of STUB_MOVE.
+ (move_insns_32): Reorder table.
+
2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_relocate_section): Properly skip IFUNC
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index c92671a..d8d11b7 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1641,6 +1641,18 @@ struct output_elf_obj_tdata
bfd_boolean flags_init;
};
+/* Indicate if the bfd contains symbols that have the STT_GNU_IFUNC
+ symbol type or STB_GNU_UNIQUE binding. Used to set the osabi
+ field in the ELF header structure. */
+enum elf_gnu_symbols
+ {
+ elf_gnu_symbol_none = 0,
+ elf_gnu_symbol_any = 1 << 0,
+ elf_gnu_symbol_ifunc = (elf_gnu_symbol_any | 1 << 1),
+ elf_gnu_symbol_unique = (elf_gnu_symbol_any | 1 << 2),
+ elf_gnu_symbol_all = (elf_gnu_symbol_ifunc | elf_gnu_symbol_unique)
+ };
+
/* Some private data is stashed away for future use using the tdata pointer
in the bfd structure. */
@@ -1751,10 +1763,7 @@ struct elf_obj_tdata
symbols. */
bfd_boolean bad_symtab;
- /* True if the bfd contains symbols that have the STT_GNU_IFUNC
- symbol type or STB_GNU_UNIQUE binding. Used to set the osabi
- field in the ELF header structure. */
- bfd_boolean has_gnu_symbols;
+ enum elf_gnu_symbols has_gnu_symbols;
/* Information grabbed from an elf core file. */
struct core_elf_obj_tdata *core;
diff --git a/bfd/elf-s390-common.c b/bfd/elf-s390-common.c
index dc6f55b..09d4e5c 100644
--- a/bfd/elf-s390-common.c
+++ b/bfd/elf-s390-common.c
@@ -238,7 +238,7 @@ elf_s390_add_symbol_hook (bfd *abfd,
|| ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE)
&& (abfd->flags & DYNAMIC) == 0
&& bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
- elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
+ elf_tdata (info->output_bfd)->has_gnu_symbols = elf_gnu_symbol_any;
return TRUE;
}
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index ff69728..d313de4 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -15928,7 +15928,7 @@ elf32_arm_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
|| ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE)
&& (abfd->flags & DYNAMIC) == 0
&& bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
- elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
+ elf_tdata (info->output_bfd)->has_gnu_symbols = elf_gnu_symbol_any;
if (elf32_arm_hash_table (info) == NULL)
return FALSE;
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 98902ac..1e4c3f4 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1576,6 +1576,10 @@ elf_i386_check_relocs (bfd *abfd,
/* It is referenced by a non-shared object. */
h->ref_regular = 1;
h->root.non_ir_ref = 1;
+
+ if (h->type == STT_GNU_IFUNC)
+ elf_tdata (info->output_bfd)->has_gnu_symbols
+ |= elf_gnu_symbol_ifunc;
}
if (! elf_i386_tls_transition (info, abfd, sec, NULL,
@@ -3148,6 +3152,15 @@ elf_i386_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
if ((info->flags & DF_TEXTREL) != 0)
{
+ if ((elf_tdata (output_bfd)->has_gnu_symbols
+ & elf_gnu_symbol_ifunc) == elf_gnu_symbol_ifunc)
+ {
+ info->callbacks->einfo
+ (_("%P%X: read-only segment has dynamic IFUNC relocations; recompile with -fPIC\n"));
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+
if (!add_dynamic_entry (DT_TEXTREL, 0))
return FALSE;
}
@@ -5330,11 +5343,11 @@ elf_i386_add_symbol_hook (bfd * abfd,
asection ** secp ATTRIBUTE_UNUSED,
bfd_vma * valp ATTRIBUTE_UNUSED)
{
- if ((ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
- || ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE)
+ if (ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE
&& (abfd->flags & DYNAMIC) == 0
&& bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
- elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
+ elf_tdata (info->output_bfd)->has_gnu_symbols
+ |= elf_gnu_symbol_unique;
return TRUE;
}
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index db0d0da..07211b5 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -4846,7 +4846,7 @@ elf_m68k_add_symbol_hook (bfd *abfd,
|| ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE)
&& (abfd->flags & DYNAMIC) == 0
&& bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
- elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
+ elf_tdata (info->output_bfd)->has_gnu_symbols = elf_gnu_symbol_any;
return TRUE;
}
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index fc1a854..91942ec 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -3653,7 +3653,7 @@ ppc_elf_add_symbol_hook (bfd *abfd,
|| ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE)
&& (abfd->flags & DYNAMIC) == 0
&& bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
- elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
+ elf_tdata (info->output_bfd)->has_gnu_symbols = elf_gnu_symbol_any;
return TRUE;
}
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index 88efe9e..8b8b601 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -184,7 +184,7 @@ elf32_sparc_add_symbol_hook (bfd * abfd,
|| ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE)
&& (abfd->flags & DYNAMIC) == 0
&& bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
- elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
+ elf_tdata (info->output_bfd)->has_gnu_symbols = elf_gnu_symbol_any;
return TRUE;
}
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index ef08164..e153ee4 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -4821,7 +4821,7 @@ ppc64_elf_add_symbol_hook (bfd *ibfd,
|| ELF_ST_BIND (isym->st_info) == STB_GNU_UNIQUE)
&& (ibfd->flags & DYNAMIC) == 0
&& bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
- elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
+ elf_tdata (info->output_bfd)->has_gnu_symbols = elf_gnu_symbol_any;
if (*sec != NULL
&& strcmp ((*sec)->name, ".opd") == 0)
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index 26e664e..5413891 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -430,7 +430,7 @@ elf64_sparc_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
|| ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE)
&& (abfd->flags & DYNAMIC) == 0
&& bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
- elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
+ elf_tdata (info->output_bfd)->has_gnu_symbols = elf_gnu_symbol_any;
if (ELF_ST_TYPE (sym->st_info) == STT_REGISTER)
{
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index b3c8522..348b297 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -1723,6 +1723,10 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info,
/* It is referenced by a non-shared object. */
h->ref_regular = 1;
h->root.non_ir_ref = 1;
+
+ if (h->type == STT_GNU_IFUNC)
+ elf_tdata (info->output_bfd)->has_gnu_symbols
+ |= elf_gnu_symbol_ifunc;
}
if (! elf_x86_64_tls_transition (info, abfd, sec, NULL,
@@ -3509,6 +3513,15 @@ elf_x86_64_size_dynamic_sections (bfd *output_bfd,
if ((info->flags & DF_TEXTREL) != 0)
{
+ if ((elf_tdata (output_bfd)->has_gnu_symbols
+ & elf_gnu_symbol_ifunc) == elf_gnu_symbol_ifunc)
+ {
+ info->callbacks->einfo
+ (_("%P%X: read-only segment has dynamic IFUNC relocations; recompile with -fPIC\n"));
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+
if (!add_dynamic_entry (DT_TEXTREL, 0))
return FALSE;
}
@@ -5873,11 +5886,11 @@ elf_x86_64_add_symbol_hook (bfd *abfd,
return TRUE;
}
- if ((ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
- || ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE)
+ if (ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE
&& (abfd->flags & DYNAMIC) == 0
&& bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
- elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
+ elf_tdata (info->output_bfd)->has_gnu_symbols
+ |= elf_gnu_symbol_unique;
return TRUE;
}
diff --git a/bfd/elfxx-aarch64.c b/bfd/elfxx-aarch64.c
index a861773..69dac6d 100644
--- a/bfd/elfxx-aarch64.c
+++ b/bfd/elfxx-aarch64.c
@@ -494,7 +494,7 @@ _bfd_aarch64_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
|| ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE)
&& (abfd->flags & DYNAMIC) == 0
&& bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
- elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
+ elf_tdata (info->output_bfd)->has_gnu_symbols = elf_gnu_symbol_any;
return TRUE;
}
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 06e8158..eb7593a 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -911,10 +911,7 @@ static bfd *reldyn_sorting_bfd;
((ABI_64_P (abfd) \
? 0xdf998010 /* ld t9,0x8010(gp) */ \
: 0x8f998010)) /* lw t9,0x8010(gp) */
-#define STUB_MOVE(abfd) \
- ((ABI_64_P (abfd) \
- ? 0x03e0782d /* daddu t7,ra */ \
- : 0x03e07821)) /* addu t7,ra */
+#define STUB_MOVE 0x03e07825 /* or t7,ra,zero */
#define STUB_LUI(VAL) (0x3c180000 + (VAL)) /* lui t8,VAL */
#define STUB_JALR 0x0320f809 /* jalr t9,ra */
#define STUB_ORI(VAL) (0x37180000 + (VAL)) /* ori t8,t8,VAL */
@@ -930,10 +927,7 @@ static bfd *reldyn_sorting_bfd;
? 0xdf3c8010 /* ld t9,0x8010(gp) */ \
: 0xff3c8010) /* lw t9,0x8010(gp) */
#define STUB_MOVE_MICROMIPS 0x0dff /* move t7,ra */
-#define STUB_MOVE32_MICROMIPS(abfd) \
- (ABI_64_P (abfd) \
- ? 0x581f7950 /* daddu t7,ra,zero */ \
- : 0x001f7950) /* addu t7,ra,zero */
+#define STUB_MOVE32_MICROMIPS 0x001f7a90 /* or t7,ra,zero */
#define STUB_LUI_MICROMIPS(VAL) \
(0x41b80000 + (VAL)) /* lui t8,VAL */
#define STUB_JALR_MICROMIPS 0x45d9 /* jalr t9 */
@@ -1030,7 +1024,7 @@ static const bfd_vma mips_o32_exec_plt0_entry[] =
0x8f990000, /* lw $25, %lo(&GOTPLT[0])($28) */
0x279c0000, /* addiu $28, $28, %lo(&GOTPLT[0]) */
0x031cc023, /* subu $24, $24, $28 */
- 0x03e07821, /* move $15, $31 # 32-bit move (addu) */
+ 0x03e07825, /* or t7, ra, zero */
0x0018c082, /* srl $24, $24, 2 */
0x0320f809, /* jalr $25 */
0x2718fffe /* subu $24, $24, 2 */
@@ -1044,7 +1038,7 @@ static const bfd_vma mips_n32_exec_plt0_entry[] =
0x8dd90000, /* lw $25, %lo(&GOTPLT[0])($14) */
0x25ce0000, /* addiu $14, $14, %lo(&GOTPLT[0]) */
0x030ec023, /* subu $24, $24, $14 */
- 0x03e07821, /* move $15, $31 # 32-bit move (addu) */
+ 0x03e07825, /* or t7, ra, zero */
0x0018c082, /* srl $24, $24, 2 */
0x0320f809, /* jalr $25 */
0x2718fffe /* subu $24, $24, 2 */
@@ -1058,7 +1052,7 @@ static const bfd_vma mips_n64_exec_plt0_entry[] =
0xddd90000, /* ld $25, %lo(&GOTPLT[0])($14) */
0x25ce0000, /* addiu $14, $14, %lo(&GOTPLT[0]) */
0x030ec023, /* subu $24, $24, $14 */
- 0x03e0782d, /* move $15, $31 # 64-bit move (daddu) */
+ 0x03e07825, /* or t7, ra, zero */
0x0018c0c2, /* srl $24, $24, 3 */
0x0320f809, /* jalr $25 */
0x2718fffe /* subu $24, $24, 2 */
@@ -1091,7 +1085,7 @@ static const bfd_vma micromips_insn32_o32_exec_plt0_entry[] =
0xff3c, 0x0000, /* lw $25, %lo(&GOTPLT[0])($28) */
0x339c, 0x0000, /* addiu $28, $28, %lo(&GOTPLT[0]) */
0x0398, 0xc1d0, /* subu $24, $24, $28 */
- 0x001f, 0x7950, /* move $15, $31 */
+ 0x001f, 0x7a90, /* or $15, $31, zero */
0x0318, 0x1040, /* srl $24, $24, 2 */
0x03f9, 0x0f3c, /* jalr $25 */
0x3318, 0xfffe /* subu $24, $24, 2 */
@@ -10714,8 +10708,7 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd,
if (htab->insn32)
{
bfd_put_micromips_32 (output_bfd,
- STUB_MOVE32_MICROMIPS (output_bfd),
- stub + idx);
+ STUB_MOVE32_MICROMIPS, stub + idx);
idx += 4;
}
else
@@ -10765,7 +10758,7 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd,
idx = 0;
bfd_put_32 (output_bfd, STUB_LW (output_bfd), stub + idx);
idx += 4;
- bfd_put_32 (output_bfd, STUB_MOVE (output_bfd), stub + idx);
+ bfd_put_32 (output_bfd, STUB_MOVE, stub + idx);
idx += 4;
if (stub_size == stub_big_size)
{
@@ -13224,8 +13217,8 @@ static const struct opcode_descriptor addiupc_insn =
#define MOVE16_RS_FIELD(r) (((r) & 0x1f) )
static const struct opcode_descriptor move_insns_32[] = {
- { /* "move", "d,s", */ 0x00000150, 0xffe007ff }, /* addu d,s,$0 */
{ /* "move", "d,s", */ 0x00000290, 0xffe007ff }, /* or d,s,$0 */
+ { /* "move", "d,s", */ 0x00000150, 0xffe007ff }, /* addu d,s,$0 */
{ 0, 0 } /* End marker for find_match(). */
};
diff --git a/bfd/version.h b/bfd/version.h
index 7de1581..68b79ad 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20150812
+#define BFD_VERSION_DATE 20150813
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
#define REPORT_BUGS_TO @report_bugs_to@
diff --git a/gas/ChangeLog b/gas/ChangeLog
index e483f4f..ecf77fb 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,65 @@
+2015-08-13 Alan Modra <amodra@gmail.com>
+
+ * expr.c (operand): Rewrite handling of operands starting with "0f".
+ If atof_generic only parses "-" or "+", treat as expression.
+
+2015-08-13 Alan Modra <amodra@gmail.com>
+ DJ Delorie <dj@redhat.com>
+
+ * expr.c (integer_constant): Return O_absent expression if eol.
+ (operand): For targets with both LOCAL_LABELS_FB and
+ NUMBERS_WITH_SUFFIX set, treat "0b" not followed by binary
+ digits as a local label reference. Correct handling of 0b prefix.
+ If a suffix is not allowed, error on 0B.
+
+2015-08-13 Alan Modra <amodra@gmail.com>
+
+ * doc/as.texinfo (Local Labels): Allowed range of N in local
+ labels is non-negative integers, not positive integers.
+
+2015-08-12 David Weatherford <weath@cadence.com>
+
+ * config/tc-xtensa.c (struct litpool_frag, struct litpool_seg):
+ New structures.
+ (xtensa_maybe_create_literal_pool_frag): New function.
+ (litpool_seg_list, auto_litpools, auto_litpool_limit)
+ (litpool_buf, litpool_slotbuf): New static variables.
+ (option_auto_litpools, option_no_auto_litpools)
+ (option_auto_litpool_limit): New enum identifiers.
+ (md_longopts): Add entries for auto-litpools, no-auto-litpools
+ and auto-litpool-limit.
+ (md_parse_option): Handle option_auto_litpools,
+ option_no_auto_litpools and option_auto_litpool_limit.
+ (md_show_usage): Add help for --[no-]auto-litpools and
+ --auto-litpool-limit.
+ (xtensa_mark_literal_pool_location): Record a place for literal
+ pool with a call to xtensa_maybe_create_literal_pool_frag.
+ (get_literal_pool_location): Find highest priority literal pool
+ or convert candidate to literal pool when auto-litpools are used.
+ (xg_assemble_vliw_tokens): Create literal pool after jump
+ instruction.
+ (xtensa_check_frag_count): Create candidate literal pool every
+ auto_litpool_limit frags.
+ (xtensa_relax_frag): Add jump around literals to non-empty
+ literal pool.
+ (xtensa_move_literals): Estimate literal pool addresses and move
+ unreachable literals closer to their users, converting candidate
+ to literal pool if needed.
+ (xtensa_switch_to_non_abs_literal_fragment): Only emit error
+ about missing .literal_position in case auto-litpools are not
+ used.
+ * config/tc-xtensa.h (xtensa_relax_statesE): New relaxation
+ state: RELAX_LITERAL_POOL_CANDIDATE_BEGIN.
+ * doc/as.texinfo (Xtensa options): Document --auto-litpools and
+ --no-auto-litpools options.
+ * doc/c-xtensa.texi (Xtensa options): Likewise.
+
+2015-08-12 Simon Dardis <simon.dardis@imgtec.com>
+
+ * config/tc-mips.c (move_register): Change to use 'or' only.
+ (s_cpload, s_cpsetup, s_cprestore, s_cpreturn): Update to
+ use or for move.
+
2015-08-11 Jiong Wang <jiong.wang@arm.com>
* config/tc-aarch64.c (reloc_table): New relocation modifiers
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index ecff88b..74b7fb4 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -9325,8 +9325,7 @@ move_register (int dest, int source)
&& !(history[0].insn_mo->pinfo2 & INSN2_BRANCH_DELAY_32BIT))
macro_build (NULL, "move", "mp,mj", dest, source);
else
- macro_build (NULL, GPR_SIZE == 32 ? "addu" : "daddu", "d,v,t",
- dest, source, 0);
+ macro_build (NULL, "or", "d,v,t", dest, source, 0);
}
/* Emit an SVR4 PIC sequence to load address LOCAL into DEST, where
@@ -15886,7 +15885,7 @@ s_cpload (int ignore ATTRIBUTE_UNUSED)
daddu $gp, $gp, $reg1
If $reg2 is given, this results in:
- daddu $reg2, $gp, $0
+ or $reg2, $gp, $0
lui $gp, %hi(%neg(%gp_rel(label)))
addiu $gp, $gp, %lo(%neg(%gp_rel(label)))
daddu $gp, $gp, $reg1
@@ -15966,8 +15965,7 @@ s_cpsetup (int ignore ATTRIBUTE_UNUSED)
BFD_RELOC_LO16, SP);
}
else
- macro_build (NULL, "daddu", "d,v,t", mips_cpreturn_register,
- mips_gp_register, 0);
+ move_register (mips_cpreturn_register, mips_gp_register);
if (mips_in_shared || HAVE_64BIT_SYMBOLS)
{
@@ -16080,7 +16078,7 @@ s_cprestore (int ignore ATTRIBUTE_UNUSED)
ld $gp, offset($sp)
If a register $reg2 was given there, it results in:
- daddu $gp, $reg2, $0 */
+ or $gp, $reg2, $0 */
static void
s_cpreturn (int ignore ATTRIBUTE_UNUSED)
@@ -16118,8 +16116,8 @@ s_cpreturn (int ignore ATTRIBUTE_UNUSED)
macro_build (&ex, "ld", "t,o(b)", mips_gp_register, BFD_RELOC_LO16, SP);
}
else
- macro_build (NULL, "daddu", "d,v,t", mips_gp_register,
- mips_cpreturn_register, 0);
+ move_register (mips_gp_register, mips_cpreturn_register);
+
macro_end ();
mips_assembling_insn = FALSE;
diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
index 7311a05..b8b1e7d 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
@@ -440,6 +440,29 @@ bfd_boolean directive_state[] =
#endif
};
+/* A circular list of all potential and actual literal pool locations
+ in a segment. */
+struct litpool_frag
+{
+ struct litpool_frag *next;
+ struct litpool_frag *prev;
+ fragS *fragP;
+ addressT addr;
+ short priority; /* 1, 2, or 3 -- 1 is highest */
+ short original_priority;
+};
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [SCM] jankratochvil/gdbserverbuildid: sticky
@ 2015-08-12 20:24 jkratoch
0 siblings, 0 replies; 8+ messages in thread
From: jkratoch @ 2015-08-12 20:24 UTC (permalink / raw)
To: archer-commits
The branch, jankratochvil/gdbserverbuildid has been updated
discards 7511e878a507fd83b0954e35afc5b1954bbf4b70 (commit)
discards 9a3e9406df37eb937420653ae950677f907688ab (commit)
discards c035efd98527f99e03a0026bc780e70b25f976c4 (commit)
discards e42869d96a302327ce96454c0d2145543c2dcd3c (commit)
discards fc064e4f050405c777709428fba9753f76e0ad67 (commit)
discards a3c14f98032a338154ad1bd6b72aa3353011913f (commit)
discards 35a6c7e8a3a06d0d4312ca0ac61f775908404539 (commit)
discards 88db88f0eaa679a6003a0d937740aabd8645b9a1 (commit)
discards abde5b2f068ead085a2a1a3dee9dd0d38fa804ea (commit)
discards cdb53cfdd51ece48623559c9438781206c542cf6 (commit)
discards 131418d98260842d5c51faa491bd1f687b0cff1e (commit)
discards 105855d3ed65660d3f6b757deb2715bf4c51f9fe (commit)
discards a400763759a2134fb35b22fe16b905397d041df2 (commit)
discards cecf494e5c91889b2e14f9de601f80a66f9f1f0c (commit)
discards d3cfb809d3bf745a0ff88d8f859ec30d8c407a41 (commit)
discards 9306fee563612fbf22cfdd1ceaed88af5c5f0f9f (commit)
discards cc174ddeed447e0f7c5c352b3955c7444f27c9c5 (commit)
discards cb971af740e27acf7c9bddbcf3cb6561eac6c212 (commit)
discards 4e73026d7c026f25c550d587986b275964ce5af6 (commit)
discards 72b8f9888a26b0c219d5b833fcedffdd008b38ce (commit)
discards 7f8e7055a0c5a85ee69cd7e2afc5b94d04152b3e (commit)
discards 8f52371e0efe7ed06a907649d640ef477999a1fc (commit)
discards 60aea42fb6c8444c1dfb8fd418bbe89c05f3eed3 (commit)
discards 49085cd8f6606199af381a7e71b90a0279ec9e34 (commit)
discards 0eddadf0d2213ddafb0aa94da9fdef0c5c912d52 (commit)
discards d7c3003426921da562b581d161bf3eb736c11780 (commit)
via ae009c1b5c62233bc52c92bb13829fbdf3f738d7 (commit)
via 4ed402d23c9bc7587d6ebeb98aac1c89f0e2996c (commit)
via d6adbe2e2ea7cafa38a43192c558dc5fb986e9e2 (commit)
via 62c380d107f284c732691bc1cf483c7001bf0575 (commit)
via f2c851971ab84f0b66b2512e00116d0cec15abe7 (commit)
via 63c8894843b98d28081a1a4ac9b22416ef139048 (commit)
via 01a167f13792d059fa27d18054793c3ed3adb2b3 (commit)
via f2e33a76348337f91f9be5a54f328e3c070a869b (commit)
via 388cf8787adb0db1a5751311181c5ae6ff2fcab8 (commit)
via 27854d1c85f0c689fec9e6c7617d09fb2c78be3a (commit)
via f53fe5034f3b652e3bd4424eb9c3641cf057b37e (commit)
via f3fb5a6526fe3ffdc2314290507a209acae2a5f1 (commit)
via 1f28d772f900f8963ffaed2b7c37edfcd40efc92 (commit)
via 486a40586c5f428a13048cef5c1575ebb9f18b61 (commit)
via 18d4031ae35ae4a5dcb03f5eeba6cd43fa713700 (commit)
via 0501d9df3ad566c9d66fb814584852dbd0930739 (commit)
via b21b3a3f00a0dd80ee641d7aa12e950e977303c1 (commit)
via 80432f849322811c259a05c8bd9a638a73e88cd5 (commit)
via fef843202f56678b4089b285d14133969f56c7e6 (commit)
via 1d63ae5cb294f9d8f0a059c49b1cf0c877b42cb5 (commit)
via 7b46b23c4bb32e7d2171ef4c19c20bf51c06d6f4 (commit)
via 524206e9a325be3684efd7af59676c307d3d150f (commit)
via bef667c7aff50753dd43712be95afab66fa94767 (commit)
via e20832687edce5b65e90fa338d42aa821207e5af (commit)
via 7a867eeefa6d8a282a119afd5cc43697bb938266 (commit)
via 4791222f9fc2a35a62078243a53409f26799f34a (commit)
from 7511e878a507fd83b0954e35afc5b1954bbf4b70 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit ae009c1b5c62233bc52c92bb13829fbdf3f738d7
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:45 2015 +0200
sticky
Message-Id: <1433754079-10395-1-git-send-email-gbenson@redhat.com>
Philippe Waroquiers wrote:
> On Fri, 2015-06-05 at 12:22 +0100, Gary Benson wrote:
> > Built and regtested on RHEL6.6 x86_64.
> I tested with the last SVN version of the Valgrind gdbserver (that
> supports qXfer:exec-file:read+).
>
> The patch introduces a regression:
> with the patch, GDB does not anymore automatically load the
> exec-file.
>
> I bypassed this problem by ignoring fake_pid_p in remote.c:
> --- a/gdb/remote.c
> +++ b/gdb/remote.c
> @@ -1624,9 +1624,13 @@ remote_add_inferior (int fake_pid_p, int pid, int
> attached,
> inf->attach_flag = attached;
> inf->fake_pid_p = fake_pid_p;
>
> - /* If no main executable is currently open then attempt to
> - open the file that was executed to create this inferior. */
> - if (try_open_exec && get_exec_file (0) == NULL)
> + /* Attempt to open the file that was executed to create this
> + inferior. If the user has explicitly specified executable
> + and/or symbol files then warn the user if their choices do
> + not match. Otherwise, set exec_file and symfile_objfile to
> + the new file. */
> + printf("fake_pid_p %d\n", fake_pid_p);
> + if (try_open_exec)// && !fake_pid_p)
> exec_file_locate_attach (pid, 1);
>
> Effectively, the printf shows that with Valgrind gdbsrv,
> fake_pid_p value is 1.
>
> When ignoring fake_pid_p, GDB can properly attach
> to different Valgrind gdbsrv, and changes of executable
> as expected.
Ah, it seems I mailed a bad patch, my apologies! I was working on
two fixes that touched the same line, and it looks like I rebased
them in the wrong order.
This updated patch has been created against the latest gdb/master
(80fb91378c91a8239817a5ab2b1c3e346109db25). Could you please try
your tests again?
Thanks,
Gary
---
On attach, GDB will only attempt to determine the main executable's
filename if one is not already set. This causes problems if you
attach to one process and then attach to another: GDB will not attempt
to discover the main executable on the second attach. If the two
processes have different main executable files then the symbols will
now be wrong. This is PR gdb/17626.
In GDB some filenames are supplied by the user (e.g. using the "file"
or "symbol-file" commands) and some are determined by GDB (e.g. while
processing an "attach" command). This commit updates GDB to track
which filenames were supplied by the user. When GDB might attempt to
determine an executable filename and one is already set, filenames
determined by GDB may be overridden but user-supplied filenames will
not.
gdb/ChangeLog:
PR gdb/17626
* progspace.h (struct program_space)
<pspace_exec_file_is_user_supplied>: New field.
<symfile_object_file_is_user_supplied>: Likewise.
(symfile_objfile_is_user_supplied): New macro.
* exec.h (exec_file_is_user_supplied): Likewise.
* exec.c (exec_close): Clear exec_file_is_user_supplied.
(exec_file_locate_attach): Remove get_exec_file check.
Do not replace user-supplied executable or symbol files.
Warn if user-supplied executable or symbol files do not
match discovered file.
(exec_file_command): Set exec_file_is_user_supplied.
* symfile.c (symbol_file_clear): Clear
symfile_objfile_is_user_supplied.
(symbol_file_command): Set symfile_objfile_is_user_supplied.
* inferior.c (add_inferior_command): Set
exec_file_is_user_supplied and symfile_objfile_is_user_supplied.
* main.c (captured_main): Likewise.
* infcmd.c (attach_command_post_wait): Always call
exec_file_locate_attach. Only call reopen_exec_file and
reread_symbols if exec_file_is_user_supplied.
* remote.c (remote_add_inferior): Remove get_exec_file check
around exec_file_locate_attach.
commit 4ed402d23c9bc7587d6ebeb98aac1c89f0e2996c
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:44 2015 +0200
mainbuildid
commit d6adbe2e2ea7cafa38a43192c558dc5fb986e9e2
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:44 2015 +0200
hexallocate
commit 62c380d107f284c732691bc1cf483c7001bf0575
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:44 2015 +0200
locatetest
commit f2c851971ab84f0b66b2512e00116d0cec15abe7
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sun Jul 12 20:59:03 2015 +0200
Tests for validate symbol file using build-id
New testcase.
gdb/testsuite/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Tests for validate symbol file using build-id.
* gdb.base/solib-mismatch-lib.c: New file.
* gdb.base/solib-mismatch-libmod.c: New file.
* gdb.base/solib-mismatch.c: New file.
* gdb.base/solib-mismatch.exp: New file.
commit 63c8894843b98d28081a1a4ac9b22416ef139048
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:43 2015 +0200
buildidwarn
commit 01a167f13792d059fa27d18054793c3ed3adb2b3
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:43 2015 +0200
buildidsolibbfdopen
commit f2e33a76348337f91f9be5a54f328e3c070a869b
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:43 2015 +0200
buildidverify
commit 388cf8787adb0db1a5751311181c5ae6ff2fcab8
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:43 2015 +0200
buildidsolibsearch
commit 27854d1c85f0c689fec9e6c7617d09fb2c78be3a
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:43 2015 +0200
buildidtofile
commit f53fe5034f3b652e3bd4424eb9c3641cf057b37e
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:42 2015 +0200
buildidproto
commit f3fb5a6526fe3ffdc2314290507a209acae2a5f1
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:42 2015 +0200
buildidtobfd
commit 1f28d772f900f8963ffaed2b7c37edfcd40efc92
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:42 2015 +0200
buildidforcemove
commit 486a40586c5f428a13048cef5c1575ebb9f18b61
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:42 2015 +0200
buildidfreefix
commit 18d4031ae35ae4a5dcb03f5eeba6cd43fa713700
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:41 2015 +0200
openpsymfile
commit 0501d9df3ad566c9d66fb814584852dbd0930739
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:41 2015 +0200
openpsolib
commit b21b3a3f00a0dd80ee641d7aa12e950e977303c1
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:41 2015 +0200
openp
commit 80432f849322811c259a05c8bd9a638a73e88cd5
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:41 2015 +0200
filelib
commit fef843202f56678b4089b285d14133969f56c7e6
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:40 2015 +0200
openfromtargetdoclose
commit 1d63ae5cb294f9d8f0a059c49b1cf0c877b42cb5
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:40 2015 +0200
openfromtargetfd
commit 7b46b23c4bb32e7d2171ef4c19c20bf51c06d6f4
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:40 2015 +0200
openfromtarget
commit 524206e9a325be3684efd7af59676c307d3d150f
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:40 2015 +0200
openpnullpathname
commit bef667c7aff50753dd43712be95afab66fa94767
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:39 2015 +0200
openpmode
commit e20832687edce5b65e90fa338d42aa821207e5af
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:39 2015 +0200
openppath
commit 7a867eeefa6d8a282a119afd5cc43697bb938266
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:39 2015 +0200
openpenum
commit 4791222f9fc2a35a62078243a53409f26799f34a
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:56:48 2015 +0200
sysrootdefault
-----------------------------------------------------------------------
Summary of changes:
gdb/solib.c | 20 ++++++++++++++++----
gdb/testsuite/gdb.base/break-probes.exp | 7 +++++--
2 files changed, 21 insertions(+), 6 deletions(-)
First 500 lines of diff:
diff --git a/gdb/solib.c b/gdb/solib.c
index 8f18b20..acb2eb1 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -346,7 +346,10 @@ solib_find_3 (char *in_pathname, int is_bfd, int is_solib, const char *sysroot,
{
file = openp_file (solib_search_path, OPF_TRY_CWD_FIRST | (is_bfd ? OPF_IS_BFD : 0), in_pathname, build_idsz, build_id);
if (file_location_is_valid (&file))
- return file;
+ {
+ file.filename = gdb_realpath_and_xfree (file.filename);
+ return file;
+ }
file_location_free (&file);
}
@@ -358,7 +361,10 @@ solib_find_3 (char *in_pathname, int is_bfd, int is_solib, const char *sysroot,
{
file = openp_file (solib_search_path, OPF_TRY_CWD_FIRST | (is_bfd ? OPF_IS_BFD : 0), target_lbasename (fskind, in_pathname), build_idsz, build_id);
if (file_location_is_valid (&file))
- return file;
+ {
+ file.filename = gdb_realpath_and_xfree (file.filename);
+ return file;
+ }
file_location_free (&file);
}
@@ -377,7 +383,10 @@ solib_find_3 (char *in_pathname, int is_bfd, int is_solib, const char *sysroot,
{
file = openp_file (get_in_environ (current_inferior ()->environment, "PATH"), OPF_TRY_CWD_FIRST | (is_bfd ? OPF_IS_BFD : 0), in_pathname, build_idsz, build_id);
if (file_location_is_valid (&file))
- return file;
+ {
+ file.filename = gdb_realpath_and_xfree (file.filename);
+ return file;
+ }
file_location_free (&file);
}
@@ -387,7 +396,10 @@ solib_find_3 (char *in_pathname, int is_bfd, int is_solib, const char *sysroot,
{
file = openp_file (get_in_environ (current_inferior ()->environment, "LD_LIBRARY_PATH"), OPF_TRY_CWD_FIRST | (is_bfd ? OPF_IS_BFD : 0), in_pathname, build_idsz, build_id);
if (file_location_is_valid (&file))
- return file;
+ {
+ file.filename = gdb_realpath_and_xfree (file.filename);
+ return file;
+ }
file_location_free (&file);
}
diff --git a/gdb/testsuite/gdb.base/break-probes.exp b/gdb/testsuite/gdb.base/break-probes.exp
index 00ca458..0431aa3 100644
--- a/gdb/testsuite/gdb.base/break-probes.exp
+++ b/gdb/testsuite/gdb.base/break-probes.exp
@@ -67,8 +67,11 @@ if { $using_probes } {
}
# GDB strips "target:" from the start of filenames
- # when operating on the local filesystem
- regsub "^target:" "$sysroot" "(target:)?" sysroot
+ # when operating on the local filesystem.
+ # Also use only the first element of $sysroot which will hopefully
+ # successfully match the filename.
+ regsub "^target:(\[^:\]*):.*$" "$sysroot" "" sysroot
+ regsub "^(?!target:)(\[^:\]*):.*$" "$sysroot" "" sysroot
# Run til it loads our library
set test "run til our library loads"
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [SCM] jankratochvil/gdbserverbuildid: sticky
@ 2015-08-12 17:12 jkratoch
0 siblings, 0 replies; 8+ messages in thread
From: jkratoch @ 2015-08-12 17:12 UTC (permalink / raw)
To: archer-commits
The branch, jankratochvil/gdbserverbuildid has been updated
discards 9ae1f06399e4965ff710ddebb88cfa70198791df (commit)
discards 8be9b469327732a45b4567606024e5fe6da65cf4 (commit)
discards 626306b225fc12f03571ddef81ae2f8c361c2737 (commit)
discards c1a4ff6f9646357800e419fde811522835ec05bb (commit)
discards c185ce8e835c1c65744659e8c95422e6b3d6e783 (commit)
discards 89c9b4a3d6f624e5e4ed2dfc0518c097a549c35c (commit)
discards 9cb2a20e52c40b89b6d7f76b4f2b71cee4e422a7 (commit)
discards 962b1449d776fcb1bc2405455772c4e49107e57c (commit)
discards 62beda73be124eecedd78f2be3edc3d2db79f9b7 (commit)
discards 464ea6806dab89759c018e90b0e3c88cda65a32e (commit)
discards 216b70135d40c6315ddf1982ec3b092aa3583e95 (commit)
discards e95a4b50c05e5c3af8f0e40dc87eac9239573ba4 (commit)
discards baff9316bd263237c339d44348a2c29e6122ce0f (commit)
discards a1aafb809024e0b113cdbe59f51319a2bca75fb8 (commit)
discards 243fc24ef9cd84a9254c33a99db4d2f6b45e902d (commit)
discards bad79bcabe0ea79f7aaea2a75afbd863721e3391 (commit)
discards 04738321e65ba17b1fd45e0e36f865ac2febfa44 (commit)
discards 610f98208fb4f57e08e75a8d3b36731fbab08ca6 (commit)
discards 15926a00baf920c1848b790dfe886441e84bcb76 (commit)
discards a98186deee4e15cae470c6b6d43b76faf4e6baa6 (commit)
discards d9d2bc9d327e07574b4d54b114c615c74056c73b (commit)
discards ed7d51ae856df050eb7f1bcdc4b302fcc3f672da (commit)
discards c36d116ad357bd1985f32c04e4df2725290d6020 (commit)
discards e2a01faf51b2ea495c301078ba59b37d75896321 (commit)
discards 0a1e61f418387228b61972c965ae6b93727f4bc1 (commit)
discards 7b4697b6a9831f90f49eed3d585ae3f372229248 (commit)
via 7511e878a507fd83b0954e35afc5b1954bbf4b70 (commit)
via 9a3e9406df37eb937420653ae950677f907688ab (commit)
via c035efd98527f99e03a0026bc780e70b25f976c4 (commit)
via e42869d96a302327ce96454c0d2145543c2dcd3c (commit)
via fc064e4f050405c777709428fba9753f76e0ad67 (commit)
via a3c14f98032a338154ad1bd6b72aa3353011913f (commit)
via 35a6c7e8a3a06d0d4312ca0ac61f775908404539 (commit)
via 88db88f0eaa679a6003a0d937740aabd8645b9a1 (commit)
via abde5b2f068ead085a2a1a3dee9dd0d38fa804ea (commit)
via cdb53cfdd51ece48623559c9438781206c542cf6 (commit)
via 131418d98260842d5c51faa491bd1f687b0cff1e (commit)
via 105855d3ed65660d3f6b757deb2715bf4c51f9fe (commit)
via a400763759a2134fb35b22fe16b905397d041df2 (commit)
via cecf494e5c91889b2e14f9de601f80a66f9f1f0c (commit)
via d3cfb809d3bf745a0ff88d8f859ec30d8c407a41 (commit)
via 9306fee563612fbf22cfdd1ceaed88af5c5f0f9f (commit)
via cc174ddeed447e0f7c5c352b3955c7444f27c9c5 (commit)
via cb971af740e27acf7c9bddbcf3cb6561eac6c212 (commit)
via 4e73026d7c026f25c550d587986b275964ce5af6 (commit)
via 72b8f9888a26b0c219d5b833fcedffdd008b38ce (commit)
via 7f8e7055a0c5a85ee69cd7e2afc5b94d04152b3e (commit)
via 8f52371e0efe7ed06a907649d640ef477999a1fc (commit)
via 60aea42fb6c8444c1dfb8fd418bbe89c05f3eed3 (commit)
via 49085cd8f6606199af381a7e71b90a0279ec9e34 (commit)
via 0eddadf0d2213ddafb0aa94da9fdef0c5c912d52 (commit)
via d7c3003426921da562b581d161bf3eb736c11780 (commit)
from 9ae1f06399e4965ff710ddebb88cfa70198791df (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 7511e878a507fd83b0954e35afc5b1954bbf4b70
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:45 2015 +0200
sticky
Message-Id: <1433754079-10395-1-git-send-email-gbenson@redhat.com>
Philippe Waroquiers wrote:
> On Fri, 2015-06-05 at 12:22 +0100, Gary Benson wrote:
> > Built and regtested on RHEL6.6 x86_64.
> I tested with the last SVN version of the Valgrind gdbserver (that
> supports qXfer:exec-file:read+).
>
> The patch introduces a regression:
> with the patch, GDB does not anymore automatically load the
> exec-file.
>
> I bypassed this problem by ignoring fake_pid_p in remote.c:
> --- a/gdb/remote.c
> +++ b/gdb/remote.c
> @@ -1624,9 +1624,13 @@ remote_add_inferior (int fake_pid_p, int pid, int
> attached,
> inf->attach_flag = attached;
> inf->fake_pid_p = fake_pid_p;
>
> - /* If no main executable is currently open then attempt to
> - open the file that was executed to create this inferior. */
> - if (try_open_exec && get_exec_file (0) == NULL)
> + /* Attempt to open the file that was executed to create this
> + inferior. If the user has explicitly specified executable
> + and/or symbol files then warn the user if their choices do
> + not match. Otherwise, set exec_file and symfile_objfile to
> + the new file. */
> + printf("fake_pid_p %d\n", fake_pid_p);
> + if (try_open_exec)// && !fake_pid_p)
> exec_file_locate_attach (pid, 1);
>
> Effectively, the printf shows that with Valgrind gdbsrv,
> fake_pid_p value is 1.
>
> When ignoring fake_pid_p, GDB can properly attach
> to different Valgrind gdbsrv, and changes of executable
> as expected.
Ah, it seems I mailed a bad patch, my apologies! I was working on
two fixes that touched the same line, and it looks like I rebased
them in the wrong order.
This updated patch has been created against the latest gdb/master
(80fb91378c91a8239817a5ab2b1c3e346109db25). Could you please try
your tests again?
Thanks,
Gary
---
On attach, GDB will only attempt to determine the main executable's
filename if one is not already set. This causes problems if you
attach to one process and then attach to another: GDB will not attempt
to discover the main executable on the second attach. If the two
processes have different main executable files then the symbols will
now be wrong. This is PR gdb/17626.
In GDB some filenames are supplied by the user (e.g. using the "file"
or "symbol-file" commands) and some are determined by GDB (e.g. while
processing an "attach" command). This commit updates GDB to track
which filenames were supplied by the user. When GDB might attempt to
determine an executable filename and one is already set, filenames
determined by GDB may be overridden but user-supplied filenames will
not.
gdb/ChangeLog:
PR gdb/17626
* progspace.h (struct program_space)
<pspace_exec_file_is_user_supplied>: New field.
<symfile_object_file_is_user_supplied>: Likewise.
(symfile_objfile_is_user_supplied): New macro.
* exec.h (exec_file_is_user_supplied): Likewise.
* exec.c (exec_close): Clear exec_file_is_user_supplied.
(exec_file_locate_attach): Remove get_exec_file check.
Do not replace user-supplied executable or symbol files.
Warn if user-supplied executable or symbol files do not
match discovered file.
(exec_file_command): Set exec_file_is_user_supplied.
* symfile.c (symbol_file_clear): Clear
symfile_objfile_is_user_supplied.
(symbol_file_command): Set symfile_objfile_is_user_supplied.
* inferior.c (add_inferior_command): Set
exec_file_is_user_supplied and symfile_objfile_is_user_supplied.
* main.c (captured_main): Likewise.
* infcmd.c (attach_command_post_wait): Always call
exec_file_locate_attach. Only call reopen_exec_file and
reread_symbols if exec_file_is_user_supplied.
* remote.c (remote_add_inferior): Remove get_exec_file check
around exec_file_locate_attach.
commit 9a3e9406df37eb937420653ae950677f907688ab
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:44 2015 +0200
mainbuildid
commit c035efd98527f99e03a0026bc780e70b25f976c4
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:44 2015 +0200
hexallocate
commit e42869d96a302327ce96454c0d2145543c2dcd3c
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:44 2015 +0200
locatetest
commit fc064e4f050405c777709428fba9753f76e0ad67
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sun Jul 12 20:59:03 2015 +0200
Tests for validate symbol file using build-id
New testcase.
gdb/testsuite/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Tests for validate symbol file using build-id.
* gdb.base/solib-mismatch-lib.c: New file.
* gdb.base/solib-mismatch-libmod.c: New file.
* gdb.base/solib-mismatch.c: New file.
* gdb.base/solib-mismatch.exp: New file.
commit a3c14f98032a338154ad1bd6b72aa3353011913f
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:43 2015 +0200
buildidwarn
commit 35a6c7e8a3a06d0d4312ca0ac61f775908404539
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:43 2015 +0200
buildidsolibbfdopen
commit 88db88f0eaa679a6003a0d937740aabd8645b9a1
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:43 2015 +0200
buildidverify
commit abde5b2f068ead085a2a1a3dee9dd0d38fa804ea
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:43 2015 +0200
buildidsolibsearch
commit cdb53cfdd51ece48623559c9438781206c542cf6
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:43 2015 +0200
buildidtofile
commit 131418d98260842d5c51faa491bd1f687b0cff1e
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:42 2015 +0200
buildidproto
commit 105855d3ed65660d3f6b757deb2715bf4c51f9fe
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:42 2015 +0200
buildidtobfd
commit a400763759a2134fb35b22fe16b905397d041df2
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:42 2015 +0200
buildidforcemove
commit cecf494e5c91889b2e14f9de601f80a66f9f1f0c
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:42 2015 +0200
buildidfreefix
commit d3cfb809d3bf745a0ff88d8f859ec30d8c407a41
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:41 2015 +0200
openpsymfile
commit 9306fee563612fbf22cfdd1ceaed88af5c5f0f9f
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:41 2015 +0200
openpsolib
commit cc174ddeed447e0f7c5c352b3955c7444f27c9c5
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:41 2015 +0200
openp
commit cb971af740e27acf7c9bddbcf3cb6561eac6c212
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:41 2015 +0200
filelib
commit 4e73026d7c026f25c550d587986b275964ce5af6
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:40 2015 +0200
openfromtargetdoclose
commit 72b8f9888a26b0c219d5b833fcedffdd008b38ce
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:40 2015 +0200
openfromtargetfd
commit 7f8e7055a0c5a85ee69cd7e2afc5b94d04152b3e
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:40 2015 +0200
openfromtarget
commit 8f52371e0efe7ed06a907649d640ef477999a1fc
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:40 2015 +0200
openpnullpathname
commit 60aea42fb6c8444c1dfb8fd418bbe89c05f3eed3
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:39 2015 +0200
openpmode
commit 49085cd8f6606199af381a7e71b90a0279ec9e34
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:39 2015 +0200
openppath
commit 0eddadf0d2213ddafb0aa94da9fdef0c5c912d52
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:39 2015 +0200
openpenum
commit d7c3003426921da562b581d161bf3eb736c11780
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:56:48 2015 +0200
sysrootdefault
-----------------------------------------------------------------------
Summary of changes:
gdb/main.c | 5 ++++-
gdb/source.c | 5 ++---
2 files changed, 6 insertions(+), 4 deletions(-)
First 500 lines of diff:
diff --git a/gdb/main.c b/gdb/main.c
index ae2803c..2c63e80 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -548,7 +548,10 @@ captured_main (void *data)
if (gdb_sysroot == NULL || *gdb_sysroot == '\0')
{
xfree (gdb_sysroot);
- gdb_sysroot = xstrdup (TARGET_SYSROOT_PREFIX);
+
+ /* Try first the local filesystem,
+ TARGET_SYSROOT_PREFIX is a fallback. */
+ gdb_sysroot = xstrdup (":" TARGET_SYSROOT_PREFIX);
}
debug_file_directory = relocate_gdb_directory (DEBUGDIR,
diff --git a/gdb/source.c b/gdb/source.c
index 99706a2..3c35075 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1031,12 +1031,11 @@ openp_file (const char *path, enum openp_flags opts, const char *string, size_t
if (!path)
path = ".";
- if ((opts & OPF_TRY_CWD_FIRST) || is_target_filename (string)
- || IS_ABSOLUTE_PATH (string))
+ if ((opts & OPF_TRY_CWD_FIRST) || IS_ABSOLUTE_PATH (string))
{
int i;
- if (is_target_filename (string) || is_regular_file (string))
+ if (is_regular_file (string))
{
filename = alloca (strlen (string) + 1);
strcpy (filename, string);
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [SCM] jankratochvil/gdbserverbuildid: sticky
@ 2015-08-12 16:28 jkratoch
0 siblings, 0 replies; 8+ messages in thread
From: jkratoch @ 2015-08-12 16:28 UTC (permalink / raw)
To: archer-commits
The branch, jankratochvil/gdbserverbuildid has been updated
discards 18b55a2660c4c4bc90b617db0336a1172d6ad506 (commit)
discards f14f9cc588192ab6db2276f533133a13a8a97cfa (commit)
discards 92266c35bc7ccf402827fd15dcf01d4475522b8d (commit)
discards 24ef919babbb591d0a1aceeb3afd9fce7f573147 (commit)
discards e5293e8b402363b88775a010c20d8818f44637f7 (commit)
discards 53ff2abcee6f83ab6d6896b7e4335b95f4477299 (commit)
discards 9c874130415a43f3b06df0473e6d716e3f6844cf (commit)
via 9ae1f06399e4965ff710ddebb88cfa70198791df (commit)
via 8be9b469327732a45b4567606024e5fe6da65cf4 (commit)
via 626306b225fc12f03571ddef81ae2f8c361c2737 (commit)
via c1a4ff6f9646357800e419fde811522835ec05bb (commit)
via c185ce8e835c1c65744659e8c95422e6b3d6e783 (commit)
via 89c9b4a3d6f624e5e4ed2dfc0518c097a549c35c (commit)
via 9cb2a20e52c40b89b6d7f76b4f2b71cee4e422a7 (commit)
via 962b1449d776fcb1bc2405455772c4e49107e57c (commit)
via 62beda73be124eecedd78f2be3edc3d2db79f9b7 (commit)
via 464ea6806dab89759c018e90b0e3c88cda65a32e (commit)
via 216b70135d40c6315ddf1982ec3b092aa3583e95 (commit)
via e95a4b50c05e5c3af8f0e40dc87eac9239573ba4 (commit)
via baff9316bd263237c339d44348a2c29e6122ce0f (commit)
via a1aafb809024e0b113cdbe59f51319a2bca75fb8 (commit)
via 243fc24ef9cd84a9254c33a99db4d2f6b45e902d (commit)
via bad79bcabe0ea79f7aaea2a75afbd863721e3391 (commit)
via 04738321e65ba17b1fd45e0e36f865ac2febfa44 (commit)
via 610f98208fb4f57e08e75a8d3b36731fbab08ca6 (commit)
via 15926a00baf920c1848b790dfe886441e84bcb76 (commit)
via a98186deee4e15cae470c6b6d43b76faf4e6baa6 (commit)
via d9d2bc9d327e07574b4d54b114c615c74056c73b (commit)
via ed7d51ae856df050eb7f1bcdc4b302fcc3f672da (commit)
via c36d116ad357bd1985f32c04e4df2725290d6020 (commit)
via e2a01faf51b2ea495c301078ba59b37d75896321 (commit)
via 0a1e61f418387228b61972c965ae6b93727f4bc1 (commit)
via 7b4697b6a9831f90f49eed3d585ae3f372229248 (commit)
via 92b2194c5c92566d5d05de65a49fba3f5a86df32 (commit)
via 90082c6c1c4a9386e008f8ca470cc8fe14032ebe (commit)
via a0df657b49186335025cde8aa62a1eadc7274ef5 (commit)
via 8c1b24620df4b7bf532fe4ecbf2bfd4c3adc1ef9 (commit)
via 45aa3a918c168453a915fa10b376f0642009584d (commit)
via 12f6dcb9318784724efe2e38d5c44a8f7af0a360 (commit)
via 105d76cc897ee03ba97c6048089b0b6d1b8ef69b (commit)
via 05a4e248b9e2d1b387235cd2d8cb577757fb6b52 (commit)
via b6dafabfb18e3ab207a1818ebe68e30337b5515d (commit)
via 6bf45b2495bb2482a019c4b28b32a49bd6a12133 (commit)
via abe8e6075bac6596f9105bbc9607038543ac849e (commit)
via 87ad46af87ce0ed30630fdbacf6d8c7a96b2c5b3 (commit)
via dd419f3aac048176e4e760dc8f29d3429c4f07ce (commit)
via 995da1ffa716fb748cc6a664e81843e751270b45 (commit)
via 43e65147c07b1400ae0dbb6694882eceb2363713 (commit)
via f3445b37b67deb8f67f7885274b2544684503f78 (commit)
via 3aade68889268c7d15e121d6d63cb1b753ec12fa (commit)
via 3739860c11a9cfcdaa4d5d204ea3536784de7bb3 (commit)
via 1b7868733d45220e63b72a1814f30e090f761821 (commit)
via aa91aff6af9f930bb8e9e4fd3dfc852cba8c80d0 (commit)
via 244558af868d5427903c35c5105bf5499639f81f (commit)
via 0eace2105dc6c005fdc908414ad564d318b71540 (commit)
via f63d6d96502c4448357a0b826489ac36f73c1330 (commit)
via 629500fae69737a6230a564e8fef1f42c3ef1116 (commit)
via eb8c4e2e66329dc7bf2024d55991efe8587075c0 (commit)
via 87f0e7204722a986f79f245eee716f0870832d47 (commit)
via 00e52e5376c7ec604a739e6242e6be36221162d7 (commit)
via 5b56227bdc000d129d393772f1e4544b5ea0fd46 (commit)
via a06efdd6effd149a1d392df8d62824e44872003a (commit)
via f00aae0f7b11c4dc85c38d5fad46975033ba3fff (commit)
via c7c1b3e998a77eb077ac3c08c88a97d2e11dfef0 (commit)
via 5f700d83f7f3ea422d789c51a25f04818bf788d7 (commit)
via a12a06d74aa88361db80309d47185df900a89312 (commit)
via c674f5cd3f900c5b12996ea5188ff818fe9eb6bc (commit)
via b261b4db940297f254280ef57589879341d09435 (commit)
via 9331eea1f83b94c6f5a72ebf643aa8978a0b0a13 (commit)
via f678ded748f994a16e27fc3ac1d1c9451b98f608 (commit)
via 07f9ddfeba5b572451471f905473f7ddbba1d472 (commit)
via 40fbed84815b00960f7fac8d2e7857942df4308c (commit)
via 70151fb54ab6e3d5dc7f99fe3fbfa7ad2f1ab2af (commit)
via 73f925cc20e839d4b7352b809a33e4e7dcbfa05a (commit)
via a12fad50d28b9251893c6709ac4374773350c21a (commit)
via 56a2e4507a4249634422fba2373b651b774c55ac (commit)
via f69e49203b49b7353748b78a9d8111440d9ac291 (commit)
via 1107e076cff62e1093da024ab73e5648051781ab (commit)
via 2c0a466a7f83eb1ee5f5da0bdd7b4b643fbe3278 (commit)
via 97dc35c88dd470465a99edeb0b491012a368f2bf (commit)
via 922c5db5e733526f12e2fbfeb72c7f1f90089d53 (commit)
via dbac553d28887561e3f154654ec8e70195d89943 (commit)
via 4c0160b8e2f902ecdf6a42dc20b5f39b0a48fac7 (commit)
via c8373ebb4ed77c361d95aa806cfbe1b4062b5be5 (commit)
via 4b0e8a5f80441fad8eddaf68e7af70bd6991aa37 (commit)
via 64140f86ab732f9ed87beccab07c32befaf9ca52 (commit)
via eff0bc54a343fed1dd152f0a1b455b2438f76e6f (commit)
via e66c3c2568fcfebc931bc18d35055c7f784133ce (commit)
via d29b2a1ece30514431861472d784ae8722816a4c (commit)
via 88fd0449a3f88c12c8930698a833f6c1c4478307 (commit)
via 2b29bb41d56d4e4ba495393f4f519718b73f92df (commit)
via 30379291886a171e6dc202122bc1c583318c2e17 (commit)
via 125453567f4a0abc68cfc67a3df46be1aa9bb904 (commit)
via 80af41e00325ff3e877df11d465baeaa3d565103 (commit)
via e27852be65403306da198b3c1d7b222acd6bdfe9 (commit)
via fd7dcb94cbd44629b3929336aec8b76c3e339656 (commit)
via 422f11824b3abf6c71042e2ee3aed572f250fc89 (commit)
via 75fb7498c25ba89262867abe5340a8d38f1e19cd (commit)
via 2bc6d61bf3e4935921ae2612b3c6cd0604428960 (commit)
via 662a7b62c477e93284de4db127b4dbc3529caaa5 (commit)
via 8fe3f3d6afbf084f9ef36d887b661792c769f862 (commit)
via e44bf850dff24e0442408e26043d957588be88ee (commit)
via 0a77d46120137650c13091866cb93150910e1317 (commit)
via d4ac1f878ecef58f1e4b4ff0cbfb4b475656eaf4 (commit)
via f12899e9f081bb857c96999386e64a4252c4a325 (commit)
via 5ac213430b710e8aaed1f4cea6ff809783201df9 (commit)
via 7f03bd92e389a32da490bb55037881cf374d0f69 (commit)
via 3fc8eb30a95df3fd07a63e9bd0a9d309b86a0357 (commit)
via d4569d7bc572ae8f10d7c527cbdfbc9d26cc1ed8 (commit)
via bfedc46af315dc6484295699c35e05040d76d700 (commit)
via d55007b58352c0b5fd2817e003b6dcf4e3ee4c07 (commit)
via fbea99ea8a062e5cd96e2d88336984ed3adc93d4 (commit)
via 372316f12874a30c62e6d71079ca3b86c786fb7e (commit)
via 2ac7589cfe1df06506adb133e99b2b89212c9a11 (commit)
via 8b0615634896718c982d367a01ec61120084d3fb (commit)
via 1afd5965eda86caed3af7f23fd1f8802831360b6 (commit)
via 4d9d9d0423ed611fa6d620ca3aa088fc16a0d59e (commit)
via c2829269f5af8a860b54ceac3596610b1f51fee5 (commit)
via 6c4cfb244b408f980be24ea2175bc58baf74a6f9 (commit)
via 567420d10895611e03d5ee65e6b24c16a69a6e99 (commit)
via d8dd4d5fe6d5ab971b731df5f65025a0dbbdb912 (commit)
via e1316e60d4d1fe406efc6e7536b2bdb43733e9d2 (commit)
via 47e9c225c1cb6fb1809218f5f546a70fc85f705c (commit)
via 5960642af99c6dc84b28e1bc69a617099b9dee97 (commit)
via 36aed29d3774a156c88ca7110f3c12605d861b9c (commit)
via 6e33951edcbed1fd803beabcde2af3b252b92164 (commit)
via 060967202b8def804d9afccad343d2eaef8a81cf (commit)
via 7ff38b1c898be5db053193f26d6a3a1d8a6074e8 (commit)
via 0b45135ec1364f9d0c850a52ce05cf4ffb038021 (commit)
via da8c46d2967b6325dcd2cc72eca26d807964c93c (commit)
via 5599c404621b2d8ac021c1427aee6e8974572042 (commit)
via 016a3251631341bf4d8fe50966d2b70f8ea69e96 (commit)
via 308d9764e1ce02c31882e6d99bbaebe63c7fe830 (commit)
via de1c2c52237dd3e8d94df7b4a304ac9df75c8cf3 (commit)
via 782e0bf46a84f57139f25c31c2ffc93508f07ef5 (commit)
via aead7601eb0ddc3fa51d43747bdad0e02abda342 (commit)
via 84da3f0cf938f8f74d9fa89f89f228bc950282c6 (commit)
via 9d996aba1a365564c18dd939772d379c97c94213 (commit)
via 33ebda9d6841e18d9ef18b94c3dcad7d0498ab3d (commit)
via a44892be35506471a53e5bc8c2def4ffccf451f9 (commit)
via ca0a5f0bd33d0aa17a5cf518e41e47ddfde486ad (commit)
via 608a1e46394e9df951968c9112fbec3065da5fba (commit)
via 05d999b0896ab6ccd4ce23a715765484c60a967d (commit)
via f0ce0d3a331129309a46a6a9ac85fce35acae72b (commit)
via bf47e2482d3e88580ba5a22db48bc773fa8ced3f (commit)
via f6a9d9c7db9b6b58e6915869c1bd7c83d96d31ee (commit)
via 83e97ed023e828a7d924b765661374272c7f7eb4 (commit)
via 4807d3f32937bc4d932638fd8f8b3084be82b74a (commit)
via b6b9ffccac04b8729d5206b5a9fefa09ea2510f3 (commit)
via 863d01bde2725d009c45ab7e9ba1dbf3f5b923f8 (commit)
via 00db26facc14ac830adef704bba9b24d0d366ddf (commit)
via ad071a3055b9b47dad340c1a1cb3a9b39529cef0 (commit)
via e0a3af227ee0602ae69320fd6f931c363f14975b (commit)
via 0cf003f49ee8bbd5dc5f1ce45193c7ae056c69b8 (commit)
via 0a39bb3218ec528236da4953a97d07f0da9313ce (commit)
via 63b9bbb7d7bcdcb6e0f59dd8da9615d80c537b8d (commit)
via 260439cb8ec21ffd75b240aadc55fd341c8c8dd4 (commit)
via 32f25203b47b1823bf77724e3eb7bbd15ca3e429 (commit)
via d89fa914ad6f10cf2827df9b3b86da1a7d9ddfd8 (commit)
via ea546fbb602046f4681319971bc7d5044d04f116 (commit)
via 4efd80aa8a99adbb38d0719ba56b07c9970793b5 (commit)
via 7e27a9d5f22f9f7ead11738b1546d0b5c737266b (commit)
via 4e13f8fb05eb7ffd163d96e519cc011d8d21e3d7 (commit)
via 524b57e6b3a36e0ce6573bbc4dba9f0bd9c165b1 (commit)
via 6085d6f69562472c389679052dcfe66cf3068a76 (commit)
via 8a7e4587c4e7d78ebbb9bcc0e65bc03f784fde6b (commit)
via 3b53ae99fbb6bea515284f725b83125d09cfea6f (commit)
via bd9e6534b7be7a228ce339bced963d2d15856390 (commit)
via ded48a5ef34314f7af698b7ec7916b084c94b18d (commit)
via c6343a91d94e9516afe56dfe85e435922bd9ea04 (commit)
via 978b9495b78054b76052a09064cae8c94a58b93e (commit)
via 9c98104c4c8f558176311dad055897c45b7d8032 (commit)
via bb57e4c7bd1d27c45195efd0b7a612bac831d2df (commit)
via 0a61824343c98b9440fe13752f800d65f765c4c1 (commit)
via 96e9210fd6fecc1926559dbfa45e7c7c59f7d821 (commit)
via beab5d94abdbea50febb1e189198fdec43db47c9 (commit)
via edc66de9a5883295bb32fad2c87bf4c62f97f54a (commit)
via a26b73ed2d90d6ef080810fa9dd166b43e8a3eb7 (commit)
via 127fcdff0541697ffd7169abafe5a51118bf65d0 (commit)
via 4122b41366b2e810bbf016d7c5514a496f0aca86 (commit)
via af60a1ef46d2c4aca22868b0f2819234b949018e (commit)
via cb1c8103f13d413e05ca6e61e21b56bba3baae74 (commit)
via ee2d2b102071f89a04f93f0434df818f69ef1e50 (commit)
via 666fcf91c0117da8294207f631df5a97fdc4157c (commit)
via c8bd4544607d4f41b89b78630fc233f53f90b6a2 (commit)
via 8e1afc817ca50aec1e77b5bd2613844bb4b4d932 (commit)
via 4e1bdb00c63a839037f31f005349c87702d50cfe (commit)
from 18b55a2660c4c4bc90b617db0336a1172d6ad506 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 9ae1f06399e4965ff710ddebb88cfa70198791df
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:45 2015 +0200
sticky
Message-Id: <1433754079-10395-1-git-send-email-gbenson@redhat.com>
Philippe Waroquiers wrote:
> On Fri, 2015-06-05 at 12:22 +0100, Gary Benson wrote:
> > Built and regtested on RHEL6.6 x86_64.
> I tested with the last SVN version of the Valgrind gdbserver (that
> supports qXfer:exec-file:read+).
>
> The patch introduces a regression:
> with the patch, GDB does not anymore automatically load the
> exec-file.
>
> I bypassed this problem by ignoring fake_pid_p in remote.c:
> --- a/gdb/remote.c
> +++ b/gdb/remote.c
> @@ -1624,9 +1624,13 @@ remote_add_inferior (int fake_pid_p, int pid, int
> attached,
> inf->attach_flag = attached;
> inf->fake_pid_p = fake_pid_p;
>
> - /* If no main executable is currently open then attempt to
> - open the file that was executed to create this inferior. */
> - if (try_open_exec && get_exec_file (0) == NULL)
> + /* Attempt to open the file that was executed to create this
> + inferior. If the user has explicitly specified executable
> + and/or symbol files then warn the user if their choices do
> + not match. Otherwise, set exec_file and symfile_objfile to
> + the new file. */
> + printf("fake_pid_p %d\n", fake_pid_p);
> + if (try_open_exec)// && !fake_pid_p)
> exec_file_locate_attach (pid, 1);
>
> Effectively, the printf shows that with Valgrind gdbsrv,
> fake_pid_p value is 1.
>
> When ignoring fake_pid_p, GDB can properly attach
> to different Valgrind gdbsrv, and changes of executable
> as expected.
Ah, it seems I mailed a bad patch, my apologies! I was working on
two fixes that touched the same line, and it looks like I rebased
them in the wrong order.
This updated patch has been created against the latest gdb/master
(80fb91378c91a8239817a5ab2b1c3e346109db25). Could you please try
your tests again?
Thanks,
Gary
---
On attach, GDB will only attempt to determine the main executable's
filename if one is not already set. This causes problems if you
attach to one process and then attach to another: GDB will not attempt
to discover the main executable on the second attach. If the two
processes have different main executable files then the symbols will
now be wrong. This is PR gdb/17626.
In GDB some filenames are supplied by the user (e.g. using the "file"
or "symbol-file" commands) and some are determined by GDB (e.g. while
processing an "attach" command). This commit updates GDB to track
which filenames were supplied by the user. When GDB might attempt to
determine an executable filename and one is already set, filenames
determined by GDB may be overridden but user-supplied filenames will
not.
gdb/ChangeLog:
PR gdb/17626
* progspace.h (struct program_space)
<pspace_exec_file_is_user_supplied>: New field.
<symfile_object_file_is_user_supplied>: Likewise.
(symfile_objfile_is_user_supplied): New macro.
* exec.h (exec_file_is_user_supplied): Likewise.
* exec.c (exec_close): Clear exec_file_is_user_supplied.
(exec_file_locate_attach): Remove get_exec_file check.
Do not replace user-supplied executable or symbol files.
Warn if user-supplied executable or symbol files do not
match discovered file.
(exec_file_command): Set exec_file_is_user_supplied.
* symfile.c (symbol_file_clear): Clear
symfile_objfile_is_user_supplied.
(symbol_file_command): Set symfile_objfile_is_user_supplied.
* inferior.c (add_inferior_command): Set
exec_file_is_user_supplied and symfile_objfile_is_user_supplied.
* main.c (captured_main): Likewise.
* infcmd.c (attach_command_post_wait): Always call
exec_file_locate_attach. Only call reopen_exec_file and
reread_symbols if exec_file_is_user_supplied.
* remote.c (remote_add_inferior): Remove get_exec_file check
around exec_file_locate_attach.
commit 8be9b469327732a45b4567606024e5fe6da65cf4
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:45 2015 +0200
openptarget
commit 626306b225fc12f03571ddef81ae2f8c361c2737
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:44 2015 +0200
mainbuildid
commit c1a4ff6f9646357800e419fde811522835ec05bb
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:44 2015 +0200
hexallocate
commit c185ce8e835c1c65744659e8c95422e6b3d6e783
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:44 2015 +0200
locatetest
commit 89c9b4a3d6f624e5e4ed2dfc0518c097a549c35c
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sun Jul 12 20:59:03 2015 +0200
Tests for validate symbol file using build-id
New testcase.
gdb/testsuite/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Tests for validate symbol file using build-id.
* gdb.base/solib-mismatch-lib.c: New file.
* gdb.base/solib-mismatch-libmod.c: New file.
* gdb.base/solib-mismatch.c: New file.
* gdb.base/solib-mismatch.exp: New file.
commit 9cb2a20e52c40b89b6d7f76b4f2b71cee4e422a7
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:43 2015 +0200
buildidwarn
commit 962b1449d776fcb1bc2405455772c4e49107e57c
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:43 2015 +0200
buildidsolibbfdopen
commit 62beda73be124eecedd78f2be3edc3d2db79f9b7
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:43 2015 +0200
buildidverify
commit 464ea6806dab89759c018e90b0e3c88cda65a32e
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:43 2015 +0200
buildidsolibsearch
commit 216b70135d40c6315ddf1982ec3b092aa3583e95
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:43 2015 +0200
buildidtofile
commit e95a4b50c05e5c3af8f0e40dc87eac9239573ba4
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:42 2015 +0200
buildidproto
commit baff9316bd263237c339d44348a2c29e6122ce0f
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:42 2015 +0200
buildidtobfd
commit a1aafb809024e0b113cdbe59f51319a2bca75fb8
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:42 2015 +0200
buildidforcemove
commit 243fc24ef9cd84a9254c33a99db4d2f6b45e902d
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:42 2015 +0200
buildidfreefix
commit bad79bcabe0ea79f7aaea2a75afbd863721e3391
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:41 2015 +0200
openpsymfile
commit 04738321e65ba17b1fd45e0e36f865ac2febfa44
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:41 2015 +0200
openpsolib
commit 610f98208fb4f57e08e75a8d3b36731fbab08ca6
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:41 2015 +0200
openp
commit 15926a00baf920c1848b790dfe886441e84bcb76
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:41 2015 +0200
filelib
commit a98186deee4e15cae470c6b6d43b76faf4e6baa6
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:40 2015 +0200
openfromtargetdoclose
commit d9d2bc9d327e07574b4d54b114c615c74056c73b
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:40 2015 +0200
openfromtargetfd
commit ed7d51ae856df050eb7f1bcdc4b302fcc3f672da
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:40 2015 +0200
openfromtarget
commit c36d116ad357bd1985f32c04e4df2725290d6020
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:40 2015 +0200
openpnullpathname
commit e2a01faf51b2ea495c301078ba59b37d75896321
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:39 2015 +0200
openpmode
commit 0a1e61f418387228b61972c965ae6b93727f4bc1
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:39 2015 +0200
openppath
commit 7b4697b6a9831f90f49eed3d585ae3f372229248
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:39 2015 +0200
openpenum
commit 92b2194c5c92566d5d05de65a49fba3f5a86df32
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:38 2015 +0200
sysrootdelim
commit 90082c6c1c4a9386e008f8ca470cc8fe14032ebe
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:05:38 2015 +0200
sysrootconst
commit a0df657b49186335025cde8aa62a1eadc7274ef5
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:08:04 2015 +0200
Validate symbol file using build-id
Consumer part of the "build-id" attribute.
gdb/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
Validate symbol file using build-id.
* NEWS (Changes since GDB 7.10): Add 'set validate-build-id'
and 'show validate-build-id'. Add build-id attribute.
* solib-darwin.c (_initialize_darwin_solib): Assign validate value.
* solib-dsbt.c (_initialize_dsbt_solib): Ditto.
* solib-frv.c (_initialize_frv_solib): Ditto.
* solib-spu.c (set_spu_solib_ops): Ditto.
* solib-svr4.c: Include rsp-low.h.
(NOTE_GNU_BUILD_ID_NAME): New define.
(svr4_validate): New function.
(svr4_copy_library_list): Duplicate field build_id.
(library_list_start_library): Parse 'build-id' attribute.
(svr4_library_attributes): Add 'build-id' attribute.
(_initialize_svr4_solib): Assign validate value.
* solib-target.c (solib.h): Include.
(_initialize_solib_target): Assign validate value.
* solib.c (validate_build_id, show_validate_build_id): New.
(solib_map_sections): Use ops->validate.
(clear_so): Free build_id.
(default_solib_validate): New function.
(_initialize_solib): Add "validate-build-id".
* solib.h (default_solib_validate): New declaration.
* solist.h (struct so_list): New fields 'build_idsz' and 'build_id'.
(target_so_ops): New field 'validate'.
gdb/doc/ChangeLog
2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.texinfo (Files): Add 'set validate-build-id'
and 'show validate-build-id'.
commit 8c1b24620df4b7bf532fe4ecbf2bfd4c3adc1ef9
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:08:03 2015 +0200
gdbserver build-id attribute generator
Producer part of the new "build-id" XML attribute.
gdb/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
gdbserver build-id attribute generator.
* features/library-list-svr4.dtd (library-list-svr4): New
'build-id' attribute.
gdb/doc/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
gdbserver build-id attribute generator.
* gdb.texinfo (Library List Format for SVR4 Targets): Add
'build-id' in description, example, new attribute in dtd.
gdb/gdbserver/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
gdbserver build-id attribute generator.
* linux-low.c (linux-maps.h, search.h, rsp-low.h): Include.
(ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
(ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
(find_phdr): New.
(get_dynamic): Use find_pdhr to traverse program headers.
(struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
(compare_mapping_entry_range, struct find_memory_region_callback_data)
(read_build_id, find_memory_region_callback, lrfind_mapping_entry)
(get_hex_build_id): New.
(linux_qxfer_libraries_svr4): Add optional build-id attribute
to reply XML document.
commit 45aa3a918c168453a915fa10b376f0642009584d
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:08:03 2015 +0200
Move linux_find_memory_regions_full & co.
This should be just a move with no changes.
gdb/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
Move linux_find_memory_regions_full & co.
* linux-tdep.c (linux-maps.h): Include.
(gdb_regex.h): Remove the include.
(enum filterflags, struct smaps_vmflags, read_mapping, decode_vmflags)
(mapping_is_anonymous_p, dump_mapping_p): Moved to common/linux-maps.c.
(linux_find_memory_region_ftype): Moved typedef to common/linux-maps.h.
(linux_find_memory_regions_full): Moved definition to
common/linux-maps.c.
* common/linux-maps.c: Include ctype.h, target/target-utils.h,
gdb_regex.h and target/target.h.
(struct smaps_vmflags, read_mapping, decode_vmflags)
(mapping_is_anonymous_p, dump_mapping_p): Move from linux-tdep.c.
(linux_find_memory_regions_full): Move from linux-tdep.c.
* common/linux-maps.h (read_mapping): New declaration.
(linux_find_memory_region_ftype, enum filterflags): Moved from
linux-tdep.c.
(linux_find_memory_regions_full): New declaration.
* target.c (target/target-utils.h): Include.
(read_alloc_pread_ftype): Moved typedef to target/target-utils.h.
(read_alloc, read_stralloc_func_ftype, read_stralloc): Moved
definitions to target/target-utils.c.
* target.h (target_fileio_read_stralloc): Move it to target/target.h.
* target/target-utils.c (read_alloc, read_stralloc): Move definitions
from target.c.
* target/target-utils.h (read_alloc_pread_ftype): New typedef.
(read_alloc): New declaration.
(read_stralloc_func_ftype): New typedef.
(read_stralloc): New declaration.
* target/target.h (target_fileio_read_stralloc): Move it from target.h.
gdb/gdbserver/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
* target.c: Include target/target-utils.h and fcntl.h.
(target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
(target_fileio_read_stralloc): New functions.
commit 12f6dcb9318784724efe2e38d5c44a8f7af0a360
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:08:03 2015 +0200
Prepare linux_find_memory_regions_full & co. for move
Prepare code for move into gdb/common/.
gdb/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
Prepare linux_find_memory_regions_full & co. for move.
* linux-tdep.c (linux_find_memory_region_ftype): Comment.
(linux_find_memory_regions_full): Change signature and prepare
for moving to linux-maps.
(linux_find_memory_regions_data): Rename field 'obfd' to 'data'.
(linux_find_memory_regions_thunk): New.
(linux_find_memory_regions_thunk): Use 'data' field instead of 'obfd'.
(linux_find_memory_regions_gdb): New.
(linux_find_memory_regions): Rename argument 'obfd' to 'func_data'.
(linux_make_mappings_corefile_notes): Use
linux_find_memory_regions_gdb.
* target.c (read_alloc_pread_ftype): New typedef.
(target_fileio_read_alloc_1_pread): New function.
(read_alloc): Refactor from target_fileio_read_alloc_1.
(read_stralloc_func_ftype): New typedef.
(target_fileio_read_alloc_1): New implementation. Use read_alloc.
(read_stralloc): Refactored from target_fileio_read_stralloc.
(target_fileio_read_stralloc): New implementation, use read_stralloc.
commit 105d76cc897ee03ba97c6048089b0b6d1b8ef69b
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:08:02 2015 +0200
Move gdb_regex* to common/
Later patches need regex support also in gdbserver.
gdb/ChangeLog
2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
* Makefile.in (HFILES_NO_SRCDIR): Change gdb_regex.h to
common/gdb_regex.h.
(COMMON_OBS): Add gdb_regex.o.
(gdb_regex.o): New.
* common/common.m4 (GDB_AC_COMMON): Add gdb_use_included_regex,
--without-included-regex and USE_INCLUDED_REGEX.
* common/gdb_regex.c: New file from utils.c functions.
* common/gdb_regex.h: Move it here from gdb_regex.h, update include
file wrapping define name.
* configure: Rebuilt.
* configure.ac (gdb_use_included_regex, --without-included-regex)
(USE_INCLUDED_REGEX): Move them to common/common.m4.
* gdb_regex.h: Move it to common/gdb_regex.h.
* utils.c: Remove include gdb_regex.h.
(do_regfree_cleanup, make_regfree_cleanup, get_regcomp_error)
(compile_rx_or_error): Move them to common/gdb_regex.c.
gdb/gdbserver/ChangeLog
2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
* Makefile.in (OBS): Add gdb_regex.o.
(gdb_regex.o): New.
* config.in: Rebuilt.
* configure: Rebuilt.
commit 05a4e248b9e2d1b387235cd2d8cb577757fb6b52
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Aug 12 18:08:01 2015 +0200
Create empty common/linux-maps.[ch] and common/target-utils.[ch]
Prepare new files for later move.
gdb/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
Create empty common/linux-maps.[ch] and common/target-utils.[ch].
* Makefile.in (ALL_TARGET_OBS): Add linux-maps.o.
(HFILES_NO_SRCDIR); Add common/linux-maps.h,
common/target-utils.h.
(COMMON_OBS): Add target-utils.o.
(linux-maps.o, target-utils.o): New.
* target/target-utils.c: New file.
* target/target-utils.h: New file.
* common/linux-maps.c: New file.
* common/linux-maps.h: New file.
* configure.tgt (aarch64*-*-linux*, alpha*-*-linux*)
(am33_2.0*-*-linux*, arm*-*-linux*, bfin-*-*linux*, cris*, frv-*-*)
(hppa*-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
(m68*-*-linux*, microblaze*-linux-*, microblaze*-*-linux*)
(mips*-*-linux*, nios2*-*-linux*, powerpc*-*-linux*, s390*-*-linux*)
(sh*-*-linux*, sparc-*-linux*, sparc64-*-linux*, tic6x-*-*linux)
(tilegx-*-linux*, x86_64-*-linux*, xtensa*-*-linux*): Add linux-maps.o
to gdb_target_obs.
gdb/gdbserver/ChangeLog
2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
Jan Kratochvil <jan.kratochvil@redhat.com>
Create empty common/linux-maps.[ch] and common/target-utils.[ch].
* Makefile.in (OBS): Add target-utils.o.
(linux-maps.o, target-utils.o): New.
* configure.srv (srv_linux_obj): Add linux-maps.o.
commit b6dafabfb18e3ab207a1818ebe68e30337b5515d
Author: Patrick Palka <patrick@parcs.ath.cx>
Date: Thu Jun 18 21:47:55 2015 -0400
Use save_vars to replace existing manipulation of globals in tests
gdb/testsuite/ChangeLog:
* gdb.base/gdbhistsize-history.exp
(test_histsize_history_setting): Use save_vars.
* gdb.base/gdbinit-history.exp (test_gdbinit_history_setting):
Use save_vars.
(test_no_truncation_of_unlimited_history_file): Use save_vars.
* gdb.base/readline.exp: Use save_vars.
commit 6bf45b2495bb2482a019c4b28b32a49bd6a12133
Author: Alan Modra <amodra@gmail.com>
Date: Wed Aug 12 19:06:01 2015 +0930
Remove ChangeLog separator
commit abe8e6075bac6596f9105bbc9607038543ac849e
Author: Patrick Palka <patrick@parcs.ath.cx>
Date: Thu Jun 18 21:33:26 2015 -0400
Introduce save_vars, a testsuite proc for safely manipulating globals
gdb/testsuite/ChangeLog:
* lib/gdb.exp (save_vars): New proc.
commit 87ad46af87ce0ed30630fdbacf6d8c7a96b2c5b3
Author: Jiong Wang <jiong.wang@arm.com>
Date: Wed Aug 12 13:17:50 2015 +0100
[AArch64] Fix test failures on elf configuration
This patch fixed those failures on elf configuration by:
* Improve the ILP32 target selector "aarch64_choose_ilp32_emul",
makes it more robust. Target triples copied from configure.tgt
* Updated emit-relocs-86/-overflow.d to use aarch64_choose_ilp32_emul
which is following what have done with emit-relocs-28.
* Those instruction encoding mismatch is because those encoding
contains pc-relative address. As for elf, we may have different
start address. relaxed encodind check, especially for
aarch64-farcall-b/bl-plt, as the main purpose of those check are
ELF text/data layout, we just want to make sure veneer to plt stub
is generated.
2015-08-12 Jiong Wang <jiong.wang@arm.com>
ld/testsuite/
* ld-aarch64/aarch64-elf.exp (aarch64_choose_ilp32_emul): Support all
four triple shapes: aarch64-*-linux*, aarch64-*-elf,
aarch64_be-*-linux*, aarch64_be-*-elf.
* ld-aarch64/emit-relocs-86.d: Use aarch64_choose_ilp32_emul.
* ld-aarch64/emit-relocs-86-overflow.d: Likewise.
* ld-aarch64/ld-aarch64/farcall-b-plt.d: Relax instrucion encoding
check when they reflect address.
* ld-aarch64/ld-aarch64/farcall-bl-plt.d: Likewise.
commit dd419f3aac048176e4e760dc8f29d3429c4f07ce
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Aug 12 05:02:21 2015 -0700
Sync ansidecl.h with GCC
Sync with GCC
2015-08-11 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* ansidecl.h (GCC_FINAL): New macro.
commit 995da1ffa716fb748cc6a664e81843e751270b45
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Aug 12 04:46:43 2015 -0700
Remove trailing spaces in ld
commit 43e65147c07b1400ae0dbb6694882eceb2363713
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Aug 12 04:45:07 2015 -0700
Remove trailing spaces in opcodes
commit f3445b37b67deb8f67f7885274b2544684503f78
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Aug 12 04:43:32 2015 -0700
Remove trailing spaces in gprof
commit 3aade68889268c7d15e121d6d63cb1b753ec12fa
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Aug 12 04:42:37 2015 -0700
Remove trailing spaces in binutils
commit 3739860c11a9cfcdaa4d5d204ea3536784de7bb3
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Aug 12 04:40:42 2015 -0700
Remove trailing spaces in gas
commit 1b7868733d45220e63b72a1814f30e090f761821
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Aug 12 04:32:43 2015 -0700
Remove trailing spaces in bfd
commit aa91aff6af9f930bb8e9e4fd3dfc852cba8c80d0
Author: Nick Clifton <nickc@redhat.com>
Date: Wed Aug 12 11:50:26 2015 +0100
Update Swedish translation in gprof.
* po/sv.po: Updated Swedish translation.
commit 244558af868d5427903c35c5105bf5499639f81f
Author: Luis Machado <lgustavo@codesourcery.com>
Date: Wed Aug 12 05:36:09 2015 -0300
[regression] Do not read from catchpoint/watchpoint locations' addresses when checking for a permanent breakpoint
While running bare-metal tests with GDB i noticed some failures in
gdb.base/break.exp, related to the use of the catch commands.
It turns out GDB tries to access memory address 0x0 whenever one tries
to insert a catchpoint, which should obviously not happen.
This was introduced with the changes for permanent breakpoints. In special,
bp_loc_is_permanent tries to check if there is a breakpoint inserted at
the same address as the current breakpoint's location's address. In the
case of catchpoints, this is 0x0.
(top-gdb) catch fork
Sending packet: $m0,1#fa...Packet received: E01
Catchpoint 4 (fork)
(top-gdb) catch vfork
Sending packet: $m0,1#fa...Packet received: E01
Catchpoint 5 (vfork)
It is not obvious to detect because this fails silently for Linux. For our
bare-metal testing, though, this fails with a clear error message from the
target about not being able to read such address.
The attached patch addresses this by bailing out of bp_loc_is_permanent (...)
if the location address is not meaningful. I also took the opportunity to
update the comment for breakpoint_address_is_meaningful, which mentioned
breakpoint addresses as opposed to their locations' addresses.
gdb/ChangeLog:
2015-08-11 Luis Machado <lgustavo@codesourcery.com>
* breakpoint.c (bp_loc_is_permanent): Return 0 when breakpoint
location address is not meaningful.
(breakpoint_address_is_meaningful): Update comment.
commit 0eace2105dc6c005fdc908414ad564d318b71540
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Aug 11 19:04:38 2015 -0700
Properly skip IFUNC relocations in debug sections
Use "continue" instead of "break" to skip IFUNC relocations in debug
sections.
* elf32-i386.c (elf_i386_relocate_section): Properly skip IFUNC
relocations in debug sections.
* elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
commit f63d6d96502c4448357a0b826489ac36f73c1330
Author: Thomas Preud'homme <thomas.preudhomme@arm.com>
Date: Wed Aug 12 09:31:04 2015 +0800
[AArch64] Rename relocs-257-symbolic-func ld test to relocs-1027-symbolic-func.
2015-08-12 Thomas Preud'homme <thomas.preudhomme@arm.com>
ld/testsuite/
* ld-aarch64/aarch64-elf.exp: Rename relocs-257-symbolic-func to
relocs-1027-symbolic-func.
* ld-aarch64/relocs-257-symbolic-func.d: Rename to ...
* ld-aarch64/relocs-1027-symbolic-func.d: ... this.
* ld-aarch64/relocs-257-symbolic-func.s: Rename to ...
* ld-aarch64/relocs-1027-symbolic-func.s: ... this.
commit 629500fae69737a6230a564e8fef1f42c3ef1116
Author: Keith Seitz <keiths@redhat.com>
Date: Tue Aug 11 17:09:36 2015 -0700
Explicit locations: documentation updates
This patch adds documentation for explicit locations to both the
User Manual and gdb's online help system.
gdb/ChangeLog:
* NEWS: Mention explicit locations.
* breakpoint.c [LOCATION_HELP_STRING]: New macro.
[BREAK_ARGS_HELP]: Use LOCATION_HELP_STRING.
(_initialize_breakpoint): Update documentation for
"clear", "break", "trace", "strace", "ftrace", and "dprintf".
gdb/doc/ChangeLog:
* gdb.texinfo (Thread-Specific Breakpoints, Printing Source Lines):
Use "location(s)"instead of "linespec(s)".
(Specifying a Location): Rewrite.
Add subsections describing linespec, address, and explicit locations.
Add node/menu for each subsection.
(Source and Machine Code, C Preprocessor Macros)
(Create and Delete Trace points)
(Extensions for Ada Tasks): Use "location(s)" instead of "linespec(s)".
(Continuing at a Different Address): Remove "linespec" examples.
Add reference to "Specify a Location"
(The -break-insert Command): Rewrite. Add anchor.
Add reference to appropriate manual section discussing locations.
(The -dprintf-insert Command): Refer to -break-insert for
specification of 'location'.
gdb/testsuite/ChangeLog:
* gdb.base/help.exp: Update help_breakpoint_text.
commit eb8c4e2e66329dc7bf2024d55991efe8587075c0
Author: Keith Seitz <keiths@redhat.com>
Date: Tue Aug 11 17:09:36 2015 -0700
Explicit locations: MI support for explicit locations
This patch adds support for explicit locations to MI's -break-insert
command. The new options, documented in the User Manual, are
--source, --line, --function, and --label.
gdb/ChangeLog:
* mi/mi-cmd-break.c (mi_cmd_break_insert_1): Add support for
explicit locations, options "--source", "--function",
"--label", and "--line".
gdb/testsuite/ChangeLog:
* gdb.mi/mi-break.exp (test_explicit_breakpoints): New proc.
(at toplevel): Call test_explicit_breakpoints.
* gdb.mi/mi-dprintf.exp: Add tests for explicit dprintf
breakpoints.
* lib/mi-support.exp (mi_make_breakpoint): Add support for
breakpoint conditions, "-cond".
commit 87f0e7204722a986f79f245eee716f0870832d47
Author: Keith Seitz <keiths@redhat.com>
Date: Tue Aug 11 17:09:36 2015 -0700
Explicit locations: add UI features for CLI
This patch exposes explicit locations to the CLI user. This enables
users to "explicitly" specify attributes of the breakpoint location
to avoid any ambiguity that might otherwise exist with linespecs.
The general syntax of explicit locations is:
-source SOURCE_FILENAME -line {+-}LINE -function FUNCTION_NAME
-label LABEL_NAME
Option names may be abbreviated, e.g., "-s SOURCE_FILENAME -li 3" and users
may use the completer with either options or values.
gdb/ChangeLog:
* completer.c: Include location.h.
(enum match_type): New enum.
(location_completer): Rename to ...
(linespec_completer): ... this.
(collect_explicit_location_matches, backup_text_ptr)
(explicit_location_completer): New functions.
(location_completer): "New" function; handle linespec
and explicit location completions.
(complete_line_internal): Remove all location completer-specific
handling.
* linespec.c (linespec_lexer_lex_keyword, is_ada_operator)
(find_toplevel_char): Export.
(linespec_parse_line_offset): Export.
Issue error if STRING is not numerical.
(gdb_get_linespec_parser_quote_characters): New function.
* linespec.h (linespec_parse_line_offset): Declare.
(get_gdb_linespec_parser_quote_characters): Declare.
(is_ada_operator): Declare.
(find_toplevel_char): Declare.
(linespec_lexer_lex_keyword): Declare.
* location.c (explicit_to_event_location): New function.
(explicit_location_lex_one): New function.
(string_to_explicit_location): New function.
(string_to_event_location): Handle explicit locations.
* location.h (explicit_to_event_location): Declare.
(string_to_explicit_location): Declare.
gdb/testsuite/ChangeLog:
* gdb.linespec/3explicit.c: New file.
* gdb.linespec/cpexplicit.cc: New file.
* gdb.linespec/cpexplicit.exp: New file.
* gdb.linespec/explicit.c: New file.
* gdb.linespec/explicit.exp: New file.
* gdb.linespec/explicit2.c: New file.
* gdb.linespec/ls-errs.exp: Add explicit location tests.
* lib/gdb.exp (capture_command_output): Regexp-escape `command'
before using in the matching pattern.
Clarify that `prefix' is a regular expression.
commit 00e52e5376c7ec604a739e6242e6be36221162d7
Author: Keith Seitz <keiths@redhat.com>
Date: Tue Aug 11 17:09:35 2015 -0700
Explicit locations: introduce explicit locations
This patch add support for explicit locations and switches many linespec
locations to this new location type. This patch also converts all
linespec locations entered by the user to an explicit representation
internally (thus bypassing the linespec parser when resetting the
breakpoint).
This patch does not introduce any user-visible changes.
gdb/ChangeLog:
* break-catch-throw.c (re_set_exception_catchpoint): Convert
linespec into explicit location.
* breakpoint.c (create_overlay_breakpoint)
(create_longjmp_master_breakpoint)
(create_std_terminate_master_breakpoint)
(create_exception_master_breakpoint): Convert linespec into explicit
location.
(update_static_tracepoint): Convert linespec into explicit location.
* linespec.c (enum offset_relative_sign, struct line_offset): Move
location.h.
(struct linespec) <expression, expr_pc, source_filename>
<function_name, label_name, line_offset>: Replace with ...
<explicit>: ... this.
<is_linespec>: New member.
(PARSER_EXPLICIT): New accessor macro.
(undefined_label_error): New function.
(source_file_not_found_error): New function.
(linespec_parse_basic): The parser result is now an explicit location.
Use PARSER_EXPLICIT to access it.
Use undefined_label_error.
(canonicalize_linespec): Convert canonical linespec into explicit
location.
Move string representation of location to explicit_location_to_linespec
and use it and explicit_location_to_string to save string
representations of the canonical location.
(create_sals_line_offset, convert_linespec_to_sals): `ls' contains an
explicit location. Update all references.
(convert_explicit_location_to_sals): New function.
(parse_linespec): Use PARSER_EXPLICIT to access the parser
result's explicit location.
(linespec_state_constructor): Initialize is_linespec.
Use PARSER_EXPLICIT.
(linespec_parser_delete): Use PARSER_EXPLICIT to access the parser's
result.
(event_location_to_sals): For linespec locations, set is_linespec.
Handle explicit locations.
(decode_objc): 'ls' contains an explicit location now. Update all
references.
(symtabs_from_filename): Use source_file_not_found_error.
* location.c (struct event_location.u) <explicit>: New member.
(initialize_explicit_location): New function.
(initialize_event_location): Initialize explicit locations.
(new_explicit_location, get_explicit_location)
(get_explicit_location_const): New functions.
(explicit_to_string_internal): New function; most of contents moved
from canonicalize_linespec.
(explicit_location_to_string): New function.
(explicit_location_to_linespec): New function.
(copy_event_location, delete_event_location)
(event_location_to_string_const, event_location_empty_p): Handle
explicit locations.
* location.h (enum offset_relative_sign, struct line_offset): Move
here from linespec.h.
(enum event_location_type): Add EXPLICIT_LOCATION.
(struct explicit_location): New structure.
(explicit_location_to_string): Declare.
(explicit_location_to_linespec): Declare.
(new_explicit_location, get_explicit_locationp
(get_explicit_location_const, initialize_explicit_location): Declare.
commit 5b56227bdc000d129d393772f1e4544b5ea0fd46
Author: Keith Seitz <keiths@redhat.com>
Date: Tue Aug 11 17:09:35 2015 -0700
Explicit locations: introduce probe locations
This patch adds support for probe locations and converts existing
probe linespec locations to the new location type.
gdb/ChangeLog:
* break-catch-throw.c (re_set_exception_catchpoint): Convert
linespec for stap probe to probe location.
* breakpoint.c (create_longjmp_master_breakpoint)
(create_exception_master_breakpoint): Likewise.
(break_command_1): Remove local variable `arg_cp'.
Check location type to set appropriate breakpoint ops methods.
(trace_command): Likewise.
* linespec.c (event_location_to_sals): Assert on probe locations.
* location.c (EL_PROBE): Add macro definition.
(new_probe_location, get_probe_location): New functions.
(copy_event_location, delete_event_location, event_location_to_string)
(string_to_event_location, event_location_empty_p): Handle probe
locations.
* location.h (enum event_location_type): Add PROBE_LOCATION.
(new_probe_location, get_probe_location): Declare.
* probe.c (parse_probes): Assert that LOCATION is a probe location.
Convert linespec into probe location.
commit a06efdd6effd149a1d392df8d62824e44872003a
Author: Keith Seitz <keiths@redhat.com>
Date: Tue Aug 11 17:09:35 2015 -0700
Explicit locations: introduce address locations
This patch adds support for address locations, of the form "*ADDR".
[Support for address linespecs has been removed/replaced by this "new"
location type.] This patch also converts any existing address locations
from its previous linespec type.
gdb/ChangeLog:
* breakpoint.c (create_thread_event_breakpoint, init_breakpoint_sal):
Convert linespec to address location.
* linespec.c (canonicalize_linespec): Do not handle address
locations here.
(convert_address_location_to_sals): New function; contents moved
from ...
(convert_linespc_to_sals): ... here.
(parse_linespec): Remove address locations from linespec grammar.
Remove handling of address locations.
(linespec_lex_to_end): Remove handling of address linespecs.
(event_location_to_sals): Handle ADDRESS_LOCATION.
(linespec_expression_to_pc): Export.
* linespec.h (linespec_expression_to_pc): Add declaration.
* location.c (struct event_location.u) <address>: New member.
(new_address_location, get_address_location): New functions.
(copy_event_location, delete_event_location, event_location_to_string)
(string_to_event_location, event_location_empty_p): Handle address
locations.
* location.h (enum event_location_type): Add ADDRESS_LOCATION.
(new_address_location, get_address_location): Declare.
* python/py-finishbreakpoint.c (bpfinishpy_init): Convert linespec
to address location.
* spu-tdep.c (spu_catch_start): Likewise.
commit f00aae0f7b11c4dc85c38d5fad46975033ba3fff
Author: Keith Seitz <keiths@redhat.com>
Date: Tue Aug 11 17:09:35 2015 -0700
Explicit locations: use new location API
This patch converts the code base to use the new struct event_location
API being introduced. This patch preserves the current functionality and
adds no new features.
The "big picture" API usage introduced by this patch may be illustrated
with a simple exmaple. Where previously developers would write:
void
my_command (char *arg, int from_tty)
{
create_breakpoint (..., arg, ...);
...
}
one now uses:
void
my_command (char *arg, int from_tty)
{
struct event_locaiton *location;
struct cleanup *back_to;
location = string_to_event_locaiton (&arg, ...);
back_to = make_cleanup_delete_event_location (location);
create_breakpoint (..., location, ...);
do_cleanups (back_to);
}
Linespec-decoding functions (now called location-decoding) such as
decode_line_full no longer skip argument pointers over processed input.
That functionality has been moved into string_to_event_location as
demonstrated above.
gdb/ChangeLog
* ax-gdb.c: Include location.h.
(agent_command_1) Use linespec location instead of address
string.
* break-catch-throw.c: Include location.h.
(re_set_exception_catchpoint): Use linespec locations instead
of address strings.
* breakpoint.c: Include location.h.
(create_overlay_event_breakpoint, create_longjmp_master_breakpoint)
(create_std_terminate_master_breakpoint)
(create_exception_master_breakpoint, update_breakpoints_after_exec):
Use linespec location instead of address string.
(print_breakpoint_location): Use locations and
event_location_to_string.
Print extra_string for pending locations for non-MI streams.
(print_one_breakpoint_location): Use locations and
event_location_to_string.
(init_raw_breakpoint_without_location): Initialize b->location.
(create_thread_event_breakpoint): Use linespec location instead of
address string.
(init_breakpoint_sal): Likewise.
Only save extra_string if it is non-NULL and not the empty string.
Use event_location_to_string instead of `addr_string'.
Constify `p' and `endp'.
Use skip_spaces_const/skip_space_const instead of non-const versions.
Copy the location into the breakpoint.
If LOCATION is NULL, save the breakpoint address as a linespec location
instead of an address string.
(create_breakpoint_sal): Change `addr_string' parameter to a struct
event_location. All uses updated.
(create_breakpoints_sal): Likewise for local variable `addr_string'.
(parse_breakpoint_sals): Use locations instead of address strings.
Remove check for empty linespec with conditional.
Refactor.
(decode_static_tracepoint_spec): Make argument const and update
function.
(create_breakpoint): Change `arg' to a struct event_location and
rename.
Remove `copy_arg' and `addr_start'.
If EXTRA_STRING is empty, set it to NULL.
Don't populate `canonical' for pending breakpoints.
Pass `extra_string' to find_condition_and_thread.
Clear `extra_string' if `rest' was NULL.
Do not error with "garbage after location" if setting a dprintf
breakpoint.
Copy the location into the breakpoint instead of an address string.
(break_command_1): Use string_to_event_location and pass this to
create_breakpoint instead of an address string.
Check against `arg_cp' for a probe linespec.
(dprintf_command): Use string_to_event_location and pass this to
create_breakpoint instead of an address string.
Throw an exception if no format string was specified.
(print_recreate_ranged_breakpoint): Use event_location_to_string
instead of address strings.
(break_range_command, until_break_command)
(init_ada_exception_breakpoint): Use locations instead
of address strings.
(say_where): Print out extra_string for pending locations.
(base_breakpoint_dtor): Delete `location' and `location_range_end' of
the breakpoint.
(base_breakpoint_create_sals_from_location): Use struct event_location
instead of address string.
Remove `addr_start' and `copy_arg' parameters.
(base_breakpoint_decode_location): Use struct event_location instead of
address string.
(bkpt_re_set): Use locations instead of address strings.
Use event_location_empty_p to check for unset location.
(bkpt_print_recreate): Use event_location_to_string instead of
an address string.
Print out extra_string for pending locations.
(bkpt_create_sals_from_location, bkpt_decode_location)
(bkpt_probe_create_sals_from_location): Use struct event_location
instead of address string.
(bkpt_probe_decode_location): Use struct event_location instead of
address string.
(tracepoint_print_recreate): Use event_location_to_string to
recreate the tracepoint.
(tracepoint_create_sals_from_location, tracepoint_decode_location)
(tracepoint_probe_create_sals_from_location)
(tracepoint_probe_decode_location): Use struct event_location
instead of address string.
(dprintf_print_recreate): Use event_location_to_string to recreate
the dprintf.
(dprintf_re_set): Remove check for valid/missing format string.
(strace_marker_create_sals_from_location)
(strace_marker_create_breakpoints_sal, strace_marker_decode_location)
(update_static_tracepoint): Use struct event_location instead of
address string.
(location_to_sals): Likewise.
Pass `extra_string' to find_condition_and_thread.
For newly resolved pending breakpoint locations, clear the location's
string representation.
Assert that the breakpoint's condition string is NULL when
condition_not_parsed.
(breakpoint_re_set_default, create_sals_from_location_default)
(decode_location_default, trace_command, ftrace_command)
(strace_command, create_tracepoint_from_upload): Use locations
instead of address strings.
* breakpoint.h (struct breakpoint_ops) <create_sals_from_location>:
Use struct event_location instead of address string.
Update all uses.
<decode_location>: Likewise.
(struct breakpoint) <addr_string>: Change to struct event_location
and rename `location'.
<addr_string_range_end>: Change to struct event_location and rename
`location_range_end'.
(create_breakpoint): Use struct event_location instead of address
string.
* cli/cli-cmds.c: Include location.h.
(edit_command, list_command): Use locations instead of address strings.
* elfread.c: Include location.h.
(elf_gnu_ifunc_resolver_return_stop): Use event_location_to_string.
* guile/scm-breakpoint.c: Include location.h.
(bpscm_print_breakpoint_smob): Use event_location_to_string.
(gdbscm_register_breakpoint): Use locations instead of address
strings.
* linespec.c: Include location.h.
(struct ls_parser) <stream>: Change to const char *.
(PARSER_STREAM): Update.
(lionespec_lexer_lex_keyword): According to find_condition_and_thread,
keywords must be followed by whitespace.
(canonicalize_linespec): Save a linespec location into `canonical'.
Save a canonical linespec into `canonical'.
(parse_linespec): Change `argptr' to const char * and rename `arg'.
All uses updated.
Update function description.
(linespec_parser_new): Initialize `parser'.
Update initialization of parsing stream.
(event_location_to_sals): New function.
(decode_line_full): Change `argptr' to a struct event_location and
rename it `location'.
Use locations instead of address strings.
Call event_location_to_sals instead of parse_linespec.
(decode_line_1): Likewise.
(decode_line_with_current_source, decode_line_with_last_displayed)
Use locations instead of address strings.
(decode_objc): Likewise.
Change `argptr' to const char * and rename `arg'.
(destroy_linespec_result): Delete the linespec result's location
instead of freeing the address string.
* linespec.h (struct linespec_result) <addr_string>: Change to
struct event_location and rename to ...
<location>: ... this.
(decode_line_1, decode_line_full): Change `argptr' to struct
event_location. All callers updated.
* mi/mi-cmd-break.c: Include language.h, location.h, and linespec.h.
(mi_cmd_break_insert_1): Use locations instead of address strings.
Throw an error if there was "garbage" at the end of the specified
linespec.
* probe.c: Include location.h.
(parse_probes): Change `argptr' to struct event_location.
Use event locations instead of address strings.
* probe.h (parse_probes): Change `argptr' to struct event_location.
* python/py-breakpoint.c: Include location.h.
(bppy_get_location): Constify local variable `str'.
Use event_location_to_string.
(bppy_init): Use locations instead of address strings.
* python/py-finishbreakpoint.c: Include location.h.
(bpfinishpy_init): Remove local variable `addr_str'.
Use locations instead of address strings.
* python/python.c: Include location.h.
(gdbpy_decode_line): Use locations instead of address strings.
* remote.c: Include location.h.
(remote_download_tracepoint): Use locations instead of address
strings.
* spu-tdep.c: Include location.h.
(spu_catch_start): Remove local variable `buf'.
Use locations instead of address strings.
* tracepoint.c: Include location.h.
(scope_info): Use locations instead of address strings.
(encode_source_string): Constify parameter `src'.
* tracepoint.h (encode_source_string): Likewise.
gdb/testsuite/ChangeLog
* gdb.base/dprintf-pending.exp: Update dprintf "without format"
test.
Add tests for missing ",FMT" and ",".
commit c7c1b3e998a77eb077ac3c08c88a97d2e11dfef0
Author: Keith Seitz <keiths@redhat.com>
Date: Tue Aug 11 17:09:35 2015 -0700
Explicit locations: introduce new struct event_location-based API
This patch introduces the new breakpoint/"linespec" API based on
a new struct event_location. This API currently only supports
traditional linespecs, maintaining the status quo of the code base.
Future patches will add additional functionality for other location
types such as address locations.
gdb/ChangeLog:
* Makefile.in (SFILES): Add location.c.
(HFILES_NO_SRCDIR): Add location.h.
(COMMON_OBS): Add location.o.
* linespec.c (linespec_lex_to_end): New function.
* linespec.h (linespec_lex_to_end): Declare.
* location.c: New file.
* location.h: New file.
commit 5f700d83f7f3ea422d789c51a25f04818bf788d7
Author: Keith Seitz <keiths@redhat.com>
Date: Tue Aug 11 17:09:35 2015 -0700
Explicit locations: rename "address string"/"addr_string" to "location"
This patch renames all occurrances of "addr_string" and "address
string" in the breakpoint/linespec APIs. This will emphasize the
change from address strings used in setting breakpoints (et al) to the
new locations-based API introduced in subsequent patches.
gdb/ChangeLog:
* breakpoint.h (struct breakpoint_ops) <create_sals_from_address>:
Renamed to create_sals_from_location.
<decode_linespec>: Renamed to decode_location.
Update all callers.
* breakpoint.c (create_sals_from_address_default): Renamed to ...
(create_sals_from_location_default): ... this.
(addr_string_to_sals): Renamed to ...
(location_to_sals): ... this.
(decode_linespec_default): Renamed to ...
(decode_location_default): ... this.
(base_breakpoint_create_sals_from_address): Renamed to ...
(base_breakpoint_create_sals_from_location): ... this.
(bkpt_create_sals_from_address): Renamed to ...
(bkpt_create_sals_from_location): ... this.
(bkpt_decode_linespec): Renamed to ...
(bkpt_decode_location): ... this.
(bkpt_probe_create_sals_from_address): Renamed to ...
(bkpt_probe_create_sals_from_location): ... this.
(tracepoint_create_sals_from_address): Renamed to ...
(tracepoint_create_sals_from_location): ... this.
(tracepoint_decode_linespec): Renamed to ...
(tracepoint_decode_location): ... this.
(tracepoint_probe_create_sals_from_address): Renamed to ...
(tracepoint_probe_create_sals_from_location): ... this.
(tracepoint_probe_decode_linespec): Renamed to ...
(tracepoint_probe_decode_location): ... this.
(strace_marker_create_sals_from_address): Renamed to ...
(strace_marker_create_sals_from_location): ... this.
(decode_linespec_default): Renamed to ...
(decode_location_default): ... this.
commit a12a06d74aa88361db80309d47185df900a89312
Author: GDB Administrator <gdbadmin@sourceware.org>
Date: Wed Aug 12 00:00:07 2015 +0000
Automatic date update in version.in
commit c674f5cd3f900c5b12996ea5188ff818fe9eb6bc
Author: Jiong Wang <jiong.wang@arm.com>
Date: Tue Aug 11 22:12:41 2015 +0100
[AArch64] Improve BFD overflow warning message for -fpic
2015-08-11 Jiong Wang <jiong.wang@arm.com>
bfd/
* elfnn-aarch64.c (elfNN_aarch64_relocate_section): Improve warning
message for R_AARCH64_LD64_GOTPAGE_LO15/R_AARCH64_LD32_GOTPAGE_LO14.
commit b261b4db940297f254280ef57589879341d09435
Author: Jiong Wang <jiong.wang@arm.com>
Date: Tue Aug 11 22:12:08 2015 +0100
[AArch64] Commit missing testcases
commit 9331eea1f83b94c6f5a72ebf643aa8978a0b0a13
Author: Jiong Wang <jiong.wang@arm.com>
Date: Tue Aug 11 22:05:39 2015 +0100
[AArch64]Speed up linking speed by skipping unncessary TLS reloc type check
2015-08-11 Jiong Wang <jiong.wang@arm.com>
bfd/
* elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): New.
(aarch64_can_relax_tls): Use the new IS_AARCH64_TLS_RELAX_RELOC.
commit f678ded748f994a16e27fc3ac1d1c9451b98f608
Author: Jiong Wang <jiong.wang@arm.com>
Date: Tue Aug 11 21:55:52 2015 +0100
[AArch64] Long branch veneer support far symbol defined by --defsym
2015-08-11 Jiong Wang <jiong.wang@arm.com>
bfd/
* bfd/elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec".
Loose the check for symbol from ABS section.
(elfNN_aarch64_size_stubs): Pass sym_sec.
ld/testsuite/
* ld-aarch64/farcall-b-defsym.s: New test.
* ld-aarch64/farcall-bl-defsym.s: Likewise.
* ld-aarch64/farcall-b-defsym.d: New expectation.
* ld-aarch64/farcall-bl-defsym.d: Likewise.
commit 07f9ddfeba5b572451471f905473f7ddbba1d472
Author: Jiong Wang <jiong.wang@arm.com>
Date: Tue Aug 11 21:44:31 2015 +0100
[AArch64] PR18668, repair long branch veneer for plt stub
2015-08-11 Jiong Wang <jiong.wang@arm.com>
bfd/
PR ld/18668
* elfnn-aarch64.c (aarch64_type_of_stub): Update destination for
calls go through plt stub.
(elfNN_aarch64_final_link_relocate): Adjust code logic for CALL26,
JUMP26 relocation to support inserting veneer for call to plt stub.
ld/testsuite/
* ld-aarch64/farcall-b-gsym.s: New test.
* ld-aarch64/farcall-b-plt.s: Likewise.
* ld-aarch64/farcall-bl-plt.s: Likewise.
* ld-aarch64/farcall-b-gsym.d: New expect file.
* ld-aarch64/farcall-b-plt.d: Likewise.
* ld-aarch64/farcall-bl-plt.d: Likewise.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 19 +
Makefile.def | 11 +-
Makefile.in | 647 ++++-
bfd/ChangeLog | 193 ++
bfd/ChangeLog-2006 | 2 +-
bfd/ChangeLog-9193 | 16 +-
bfd/ChangeLog-9495 | 134 +-
bfd/Makefile.am | 4 +-
bfd/Makefile.in | 4 +-
bfd/acinclude.m4 | 4 +-
bfd/bfd-in2.h | 12 +
bfd/bfd.m4 | 4 +-
bfd/coff-rs6000.c | 2 +-
bfd/coff-sh.c | 2 +-
bfd/coffcode.h | 8 +-
bfd/coffgen.c | 6 +-
bfd/config.bfd | 10 +-
bfd/configure.ac | 4 +-
bfd/configure.com | 4 +-
bfd/configure.host | 4 +-
bfd/cpu-avr.c | 10 +-
bfd/cpu-nios2.c | 2 +-
bfd/ecoff.c | 2 +-
bfd/elf-attrs.c | 2 +-
bfd/elf-bfd.h | 13 +-
bfd/elf.c | 81 +-
bfd/elf32-cris.c | 14 +-
bfd/elf32-h8300.c | 2 +-
bfd/elf32-i386.c | 12 +-
bfd/elf32-msp430.c | 54 +-
bfd/elf32-nios2.c | 86 +-
bfd/elf32-nios2.h | 2 +-
bfd/elf32-or1k.c | 6 +-
bfd/elf32-ppc.c | 12 +-
bfd/elf32-rl78.c | 8 +-
bfd/elf32-sh.c | 2 +-
bfd/elf32-v850.c | 18 +-
bfd/elf64-sh64.c | 2 +-
bfd/elf64-x86-64.c | 12 +-
bfd/elflink.c | 219 ++-
bfd/elfnn-aarch64.c | 160 +-
bfd/elfxx-aarch64.c | 5 +
bfd/elfxx-sparc.c | 4 +-
bfd/ihex.c | 6 +-
bfd/libbfd-in.h | 2 +-
bfd/libbfd.h | 5 +-
bfd/mach-o.c | 20 +-
bfd/makefile.vms | 6 +-
bfd/mep-relocs.pl | 4 +-
bfd/opncls.c | 2 +-
bfd/peXXigen.c | 4 +-
bfd/pei-x86_64.c | 2 +-
bfd/peicode.h | 32 +
bfd/reloc.c | 15 +
bfd/srec.c | 2 +-
bfd/versados.c | 4 +-
bfd/version.h | 2 +-
bfd/vms-alpha.c | 2 +-
bfd/warning.m4 | 6 +-
binutils/BRANCHES | 4 +-
binutils/ChangeLog | 26 +
binutils/ChangeLog-2005 | 4 +-
binutils/ChangeLog-2006 | 4 +-
binutils/ChangeLog-2008 | 4 +-
binutils/ChangeLog-2009 | 2 +-
binutils/MAINTAINERS | 2 +-
binutils/NEWS | 10 +-
binutils/README | 2 +-
binutils/ar.c | 3 +-
binutils/arlex.l | 6 +-
binutils/arparse.y | 30 +-
binutils/bucomm.c | 8 +-
binutils/coffgrok.c | 2 +-
binutils/configure | 93 +-
binutils/configure.ac | 4 +-
binutils/configure.com | 6 +-
binutils/configure.tgt | 16 +-
binutils/deflex.l | 12 +-
binutils/defparse.y | 28 +-
binutils/dlltool.c | 58 +-
binutils/dllwrap.c | 10 +-
binutils/doc/binutils.texi | 17 +-
binutils/dwarf.c | 2 +-
binutils/elfcomm.c | 12 +-
binutils/embedspu.sh | 2 +-
binutils/makefile.vms | 4 +-
binutils/mcparse.y | 10 +-
binutils/nlmconv.c | 8 +-
binutils/nm.c | 4 +-
binutils/objcopy.c | 18 +-
binutils/objdump.c | 100 +-
binutils/rclex.c | 12 +-
binutils/rcparse.y | 42 +-
binutils/readelf.c | 2 +-
binutils/resbin.c | 6 +-
binutils/rescoff.c | 2 +-
binutils/resrc.c | 14 +-
binutils/resres.c | 2 +-
binutils/stabs.c | 2 +-
binutils/strings.c | 6 +-
binutils/sysinfo.y | 88 +-
binutils/syslex.l | 2 +-
binutils/syslex_wrap.c | 2 +-
binutils/sysroff.info | 32 +-
binutils/testsuite/ChangeLog | 44 +
binutils/testsuite/binutils-all/objcopy.exp | 81 +
binutils/testsuite/binutils-all/strip-12.d | 7 +
binutils/testsuite/binutils-all/strip-12.s | 7 +
binutils/testsuite/binutils-all/symbols-1.d | 15 +
binutils/testsuite/binutils-all/symbols-2.d | 15 +
binutils/testsuite/binutils-all/symbols-3.d | 15 +
binutils/testsuite/binutils-all/symbols-4.d | 15 +
binutils/testsuite/binutils-all/symbols.s | 14 +
binutils/testsuite/lib/utils-lib.exp | 36 +-
binutils/windres.c | 16 +-
config.guess | 6 +-
config.sub | 7 +-
gas/ChangeLog | 53 +
gas/ChangeLog-2005 | 6 +-
gas/ChangeLog-2006 | 4 +-
gas/ChangeLog-2010 | 2 +-
gas/ChangeLog-9295 | 24 +-
gas/README | 4 +-
gas/config/atof-ieee.c | 2 +-
gas/config/atof-vax.c | 2 +-
gas/config/m68k-parse.y | 18 +-
gas/config/obj-coff.h | 8 +-
gas/config/obj-elf.c | 2 +-
gas/config/obj-evax.c | 6 +-
gas/config/obj-macho.c | 122 +-
gas/config/obj-macho.h | 2 +-
gas/config/rl78-defs.h | 2 +-
gas/config/rl78-parse.y | 2 +-
gas/config/rx-parse.y | 2 +-
gas/config/tc-aarch64.c | 24 +
gas/config/tc-alpha.c | 30 +-
gas/config/tc-arm.c | 22 +-
gas/config/tc-cr16.c | 12 +-
gas/config/tc-cr16.h | 4 +-
gas/config/tc-cris.c | 4 +-
gas/config/tc-crx.c | 112 +-
gas/config/tc-crx.h | 4 +-
gas/config/tc-dlx.c | 2 +-
gas/config/tc-frv.c | 68 +-
gas/config/tc-h8300.c | 50 +-
gas/config/tc-i370.c | 2 +-
gas/config/tc-i386.c | 2 +-
gas/config/tc-i860.c | 10 +-
gas/config/tc-i960.c | 10 +-
gas/config/tc-ia64.c | 28 +-
gas/config/tc-ip2k.c | 12 +-
gas/config/tc-m32c.c | 26 +-
gas/config/tc-m32r.c | 12 +-
gas/config/tc-m32r.h | 2 +-
gas/config/tc-m68hc11.c | 34 +-
gas/config/tc-m68k.c | 80 +-
gas/config/tc-mcore.c | 2 +-
gas/config/tc-mep.c | 38 +-
gas/config/tc-mep.h | 2 +-
gas/config/tc-microblaze.h | 4 +-
gas/config/tc-mips.c | 22 +-
gas/config/tc-mmix.c | 8 +-
gas/config/tc-mn10300.c | 14 +-
gas/config/tc-moxie.c | 10 +-
gas/config/tc-msp430.c | 136 +-
gas/config/tc-mt.c | 34 +-
gas/config/tc-mt.h | 2 +-
gas/config/tc-nios2.c | 170 +-
gas/config/tc-ns32k.c | 2 +-
gas/config/tc-ppc.c | 4 +-
gas/config/tc-rl78.c | 4 +-
gas/config/tc-rx.c | 2 +-
gas/config/tc-s390.c | 2 +-
gas/config/tc-score.h | 4 +-
gas/config/tc-sh.c | 8 +-
gas/config/tc-sparc.c | 2 +-
gas/config/tc-spu.c | 22 +-
gas/config/tc-tic30.c | 2 +-
gas/config/tc-tic4x.c | 106 +-
gas/config/tc-tic4x.h | 2 +-
gas/config/tc-tic6x.c | 10 +-
gas/config/tc-v850.c | 2 +-
gas/config/tc-vax.c | 110 +-
gas/config/tc-xc16x.c | 4 +-
gas/config/tc-xc16x.h | 2 +-
gas/config/tc-xstormy16.c | 6 +-
gas/config/tc-xtensa.c | 50 +-
gas/config/tc-xtensa.h | 4 +-
gas/config/tc-z80.c | 20 +-
gas/config/tc-z80.h | 2 +-
gas/config/te-generic.h | 2 +-
gas/config/te-vms.c | 2 +-
gas/config/xtensa-relax.c | 12 +-
gas/configure.ac | 4 +-
gas/configure.com | 8 +-
gas/configure.tgt | 8 +-
gas/doc/c-aarch64.texi | 4 +
gas/dwarf2dbg.c | 2 +-
gas/itbl-lex.l | 22 +-
gas/itbl-parse.y | 56 +-
gas/makefile.vms | 4 +-
gas/testsuite/ChangeLog | 28 +
gas/testsuite/gas/aarch64/reloc-dtprel_lo12-1.d | 9 +
gas/testsuite/gas/aarch64/reloc-dtprel_lo12-1.s | 5 +
.../gas/aarch64/reloc-dtprel_lo12-ilp32-1.d | 10 +
.../gas/aarch64/reloc-dtprel_lo12-ilp32-1.s | 5 +
gas/testsuite/gas/aarch64/reloc-tlsldm-page-1.d | 10 +
gas/testsuite/gas/aarch64/reloc-tlsldm-page-1.s | 6 +
.../gas/aarch64/reloc-tlsldm-page-ilp32-1.d | 12 +
.../gas/aarch64/reloc-tlsldm-page-ilp32-1.s | 6 +
gas/testsuite/gas/aarch64/reloc-tlsldm_lo12_nc-1.d | 10 +
gas/testsuite/gas/aarch64/reloc-tlsldm_lo12_nc-1.s | 5 +
.../gas/aarch64/reloc-tlsldm_lo12_nc-ilp32-1.d | 11 +
.../gas/aarch64/reloc-tlsldm_lo12_nc-ilp32-1.s | 5 +
gas/testsuite/gas/mips/r6-n32.d | 2 +
gas/testsuite/gas/mips/r6-n64.d | 2 +
gas/testsuite/gas/mips/r6.d | 2 +
gas/testsuite/gas/mips/r6.s | 3 +
gdb/ChangeLog | 931 +++++++
gdb/Makefile.in | 11 +-
gdb/NEWS | 21 +
gdb/aarch64-linux-nat.c | 26 +-
gdb/acinclude.m4 | 127 +-
gdb/arm-linux-nat.c | 37 +-
gdb/arm-tdep.c | 4 +-
gdb/ax-gdb.c | 8 +-
gdb/ax-general.c | 2 +-
gdb/break-catch-throw.c | 23 +-
gdb/breakpoint.c | 834 ++++---
gdb/breakpoint.h | 51 +-
gdb/btrace.c | 15 +
gdb/btrace.h | 10 +
gdb/build-id.c | 137 +-
gdb/build-id.h | 3 +
gdb/c-exp.y | 2 +-
gdb/cli/cli-cmds.c | 54 +-
gdb/common/agent.c | 1 -
gdb/common/filestuff.c | 2 +
gdb/compile/compile-loc2c.c | 4 +-
gdb/complaints.c | 17 +-
gdb/completer.c | 218 ++-
gdb/configure | 856 +++++--
gdb/configure.ac | 14 +
gdb/cp-name-parser.y | 2 +-
gdb/darwin-nat.c | 6 +-
gdb/defs.h | 15 +-
gdb/doc/ChangeLog | 28 +
gdb/doc/gdb.texinfo | 297 ++-
gdb/dtrace-probe.c | 8 +
gdb/dwarf2expr.c | 2 +-
gdb/dwarf2loc.c | 4 +-
gdb/dwarf2read.c | 35 +-
gdb/elfread.c | 4 +-
gdb/eval.c | 3 +-
gdb/exec.c | 110 +-
gdb/exec.h | 2 +
gdb/features/library-list-svr4.dtd | 5 +-
gdb/frame.c | 42 +
gdb/frame.h | 7 +
gdb/gdb_bfd.c | 46 +-
gdb/gdb_bfd.h | 4 +
gdb/gdbarch.h | 6 +-
gdb/gdbarch.sh | 4 +
gdb/gdbserver/ChangeLog | 154 ++
gdb/gdbserver/configure.srv | 5 +
gdb/gdbserver/gdbthread.h | 3 +-
gdb/gdbserver/inferiors.c | 4 +-
gdb/gdbserver/inferiors.h | 5 +-
gdb/gdbserver/linux-aarch32-low.c | 140 +
gdb/gdbserver/linux-aarch32-low.h | 29 +
gdb/gdbserver/linux-aarch64-low.c | 100 +-
gdb/gdbserver/linux-arm-low.c | 78 +-
gdb/gdbserver/linux-low.c | 348 ++-
gdb/gdbserver/linux-low.h | 13 +-
gdb/gdbserver/linux-nios2-low.c | 25 +-
gdb/gdbserver/linux-x86-low.c | 3 -
gdb/gdbserver/regcache.c | 7 +-
gdb/gdbserver/server.c | 8 +-
gdb/gdbserver/server.h | 1 +
gdb/gdbserver/thread-db.c | 70 +-
gdb/gdbserver/tracepoint.c | 6 +-
gdb/gdbthread.h | 61 +-
gdb/guile/scm-breakpoint.c | 23 +-
gdb/guile/scm-param.c | 2 +-
gdb/i386-linux-tdep.c | 2 +-
gdb/inf-ptrace.c | 6 +-
gdb/infcmd.c | 31 +-
gdb/inferior.c | 3 +
gdb/infrun.c | 2234 ++++++++++++----
gdb/infrun.h | 7 +
gdb/language.c | 35 +-
gdb/language.h | 2 -
gdb/linespec.c | 582 +++--
gdb/linespec.h | 42 +-
gdb/linux-nat.c | 33 +-
gdb/linux-thread-db.c | 100 +-
gdb/location.c | 714 +++++
gdb/location.h | 231 ++
gdb/main.c | 24 +-
gdb/memory-map.c | 2 +-
gdb/mi/mi-cmd-break.c | 76 +-
gdb/nat/gdb_thread_db.h | 60 +
gdb/nat/linux-waitpid.c | 2 +-
gdb/nios2-linux-tdep.c | 36 +-
gdb/nios2-tdep.c | 709 +++++-
gdb/nios2-tdep.h | 7 +-
gdb/nto-procfs.c | 16 +-
gdb/nto-tdep.c | 30 +-
gdb/nto-tdep.h | 2 +-
gdb/osabi.c | 16 +-
gdb/parse.c | 3 +-
gdb/ppc-linux-tdep.c | 31 +-
gdb/probe.c | 20 +-
gdb/probe.h | 6 +-
gdb/procfs.c | 6 +-
gdb/progspace.h | 17 +
gdb/python/lib/gdb/command/type_printers.py | 2 +-
gdb/python/py-breakpoint.c | 12 +-
gdb/python/py-finishbreakpoint.c | 16 +-
gdb/python/py-frame.c | 2 +-
gdb/python/py-linetable.c | 14 +-
gdb/python/py-symbol.c | 5 +-
gdb/python/py-symtab.c | 8 +-
gdb/python/python.c | 26 +-
gdb/record-btrace.c | 25 +-
gdb/record-full.c | 2 +-
gdb/regcache.c | 6 +-
gdb/remote-m32r-sdi.c | 6 +-
gdb/remote-sim.c | 20 +-
gdb/remote.c | 76 +-
gdb/rs6000-tdep.c | 70 +-
gdb/s390-linux-tdep.c | 115 +-
gdb/solib-aix.c | 6 +-
gdb/solib-darwin.c | 5 +-
gdb/solib-dsbt.c | 3 +-
gdb/solib-frv.c | 3 +-
gdb/solib-spu.c | 5 +-
gdb/solib-svr4.c | 156 +-
gdb/solib-target.c | 2 -
gdb/solib.c | 333 ++-
gdb/solib.h | 4 -
gdb/solist.h | 22 +-
gdb/source.c | 364 +++-
gdb/source.h | 24 +
gdb/spu-tdep.c | 11 +-
gdb/stack.c | 45 -
gdb/symfile.c | 34 +-
gdb/symtab.c | 40 +-
gdb/symtab.h | 2 +
gdb/target-debug.h | 5 +-
gdb/target-delegates.c | 59 +
gdb/target.c | 92 +
gdb/target.h | 28 +-
gdb/target/waitstatus.h | 5 +-
gdb/testsuite/ChangeLog | 165 ++-
gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp | 50 +-
gdb/testsuite/gdb.base/bp-permanent.exp | 17 +-
gdb/testsuite/gdb.base/checkpoint-ns.exp | 26 +
gdb/testsuite/gdb.base/checkpoint.exp | 6 +-
gdb/testsuite/gdb.base/completion.exp | 82 +
gdb/testsuite/gdb.base/dprintf-pending.exp | 10 +-
gdb/testsuite/gdb.base/gdbhistsize-history.exp | 41 +-
gdb/testsuite/gdb.base/gdbinit-history.exp | 124 +-
gdb/testsuite/gdb.base/help.exp | 2 +-
gdb/testsuite/gdb.base/readline.exp | 94 +-
gdb/testsuite/gdb.base/solib-mismatch.exp | 46 +-
gdb/testsuite/gdb.base/valgrind-disp-step.c | 32 +
gdb/testsuite/gdb.base/valgrind-disp-step.exp | 136 +
gdb/testsuite/gdb.base/valgrind-infcall.exp | 5 +
gdb/testsuite/gdb.btrace/instruction_history.exp | 20 +-
gdb/testsuite/gdb.btrace/tsx.c | 26 +
gdb/testsuite/gdb.btrace/tsx.exp | 41 +
gdb/testsuite/gdb.btrace/x86-tsx.S | 29 +
gdb/testsuite/gdb.linespec/3explicit.c | 28 +
gdb/testsuite/gdb.linespec/cpexplicit.cc | 63 +
gdb/testsuite/gdb.linespec/cpexplicit.exp | 112 +
gdb/testsuite/gdb.linespec/explicit.c | 56 +
gdb/testsuite/gdb.linespec/explicit.exp | 406 +++
gdb/testsuite/gdb.linespec/explicit2.c | 24 +
gdb/testsuite/gdb.linespec/ls-errs.exp | 57 +-
gdb/testsuite/gdb.mi/mi-break.exp | 82 +
gdb/testsuite/gdb.mi/mi-dprintf.exp | 12 +-
gdb/testsuite/gdb.perf/single-step.exp | 2 +-
gdb/testsuite/gdb.reverse/step-precsave.exp | 15 +-
gdb/testsuite/gdb.reverse/until-precsave.exp | 4 +-
.../gdb.threads/forking-threads-plus-breakpoint.c | 139 +
.../forking-threads-plus-breakpoint.exp | 117 +
.../gdb.threads/next-while-other-thread-longjmps.c | 127 +
.../next-while-other-thread-longjmps.exp | 40 +
.../gdb.threads/process-dies-while-handling-bp.c | 73 +
.../gdb.threads/process-dies-while-handling-bp.exp | 147 +
.../signal-while-stepping-over-bp-other-thread.exp | 2 +-
.../gdb.threads/step-over-lands-on-breakpoint.c | 17 +-
.../gdb.threads/step-over-lands-on-breakpoint.exp | 6 +-
.../gdb.threads/step-over-trips-on-watchpoint.c | 17 +-
.../gdb.threads/step-over-trips-on-watchpoint.exp | 9 +-
gdb/testsuite/lib/gdb.exp | 197 ++-
gdb/testsuite/lib/mi-support.exp | 16 +-
gdb/thread.c | 197 ++-
gdb/top.c | 6 +-
gdb/tracepoint.c | 16 +-
gdb/tracepoint.h | 2 +-
gdb/utils.c | 11 +-
gdb/utils.h | 2 +
gdb/windows-nat.c | 6 +-
gdb/xtensa-linux-nat.c | 18 +-
gprof/ChangeLog | 4 +
gprof/ChangeLog-2009 | 2 +-
gprof/Makefile.am | 4 +-
gprof/Makefile.in | 4 +-
gprof/README | 8 +-
gprof/basic_blocks.c | 2 +-
gprof/configure.ac | 4 +-
gprof/flat_bl.m | 4 +-
gprof/gmon.h | 4 +-
gprof/gmon_io.c | 8 +-
gprof/gprof.c | 10 +-
gprof/gprof.texi | 60 +-
gprof/hist.c | 48 +-
gprof/hist.h | 4 +-
gprof/po/sv.po | 209 +-
include/ChangeLog | 7 +
include/ansidecl.h | 9 +
include/elf/ChangeLog | 12 +
include/elf/aarch64.h | 3 +
intl/ChangeLog | 4 +
intl/configure | 824 ++----
ld/ChangeLog | 28 +
ld/ChangeLog-2009 | 2 +-
ld/ChangeLog-9197 | 2 +-
ld/NEWS | 3 +
ld/configure.ac | 4 +-
ld/configure.host | 6 +-
ld/ld.texinfo | 25 +-
ld/ldexp.c | 82 +-
ld/ldint.texinfo | 92 +-
ld/ldlang.c | 52 +
ld/ldlang.h | 2 +
ld/ldlex.h | 1 +
ld/lexsup.c | 6 +
ld/scripttempl/elf.sc | 4 +-
ld/testsuite/ChangeLog | 95 +
ld/testsuite/ld-aarch64/aarch64-elf.exp | 23 +-
ld/testsuite/ld-aarch64/emit-relocs-529-overflow.d | 4 +
ld/testsuite/ld-aarch64/emit-relocs-529-overflow.s | 11 +
ld/testsuite/ld-aarch64/emit-relocs-529.d | 7 +
ld/testsuite/ld-aarch64/emit-relocs-529.s | 10 +
ld/testsuite/ld-aarch64/emit-relocs-86-overflow.d | 5 +
ld/testsuite/ld-aarch64/emit-relocs-86-overflow.s | 11 +
ld/testsuite/ld-aarch64/emit-relocs-86.d | 8 +
ld/testsuite/ld-aarch64/emit-relocs-86.s | 10 +
ld/testsuite/ld-aarch64/farcall-b-defsym.d | 18 +
ld/testsuite/ld-aarch64/farcall-b-defsym.s | 10 +
ld/testsuite/ld-aarch64/farcall-b-gsym.d | 5 +
ld/testsuite/ld-aarch64/farcall-b-gsym.s | 17 +
ld/testsuite/ld-aarch64/farcall-b-plt.d | 38 +
ld/testsuite/ld-aarch64/farcall-b-plt.s | 11 +
ld/testsuite/ld-aarch64/farcall-bl-defsym.d | 18 +
ld/testsuite/ld-aarch64/farcall-bl-defsym.s | 10 +
ld/testsuite/ld-aarch64/farcall-bl-plt.d | 38 +
ld/testsuite/ld-aarch64/farcall-bl-plt.s | 12 +
.../ld-aarch64/relocs-1027-symbolic-func.d | 5 +
...symbolic-func.s => relocs-1027-symbolic-func.s} | 0
ld/testsuite/ld-aarch64/relocs-257-symbolic-func.d | 5 -
ld/testsuite/ld-aarch64/tls-small-ld.d | 9 +
ld/testsuite/ld-aarch64/tls-small-ld.s | 8 +
ld/testsuite/ld-elf/indirect.exp | 25 +-
ld/testsuite/ld-elf/pr18720.out | 2 +
ld/testsuite/ld-elf/pr18720a.c | 27 +
ld/testsuite/ld-elf/pr18720b.c | 11 +
ld/testsuite/ld-elf/pr18720c.c | 15 +
ld/testsuite/ld-ifunc/ifunc.exp | 27 +
ld/testsuite/ld-ifunc/pr18808.out | 1 +
ld/testsuite/ld-ifunc/pr18808a.c | 9 +
ld/testsuite/ld-ifunc/pr18808b.c | 24 +
ld/testsuite/ld-undefined/require-defined-1.d | 4 +
ld/testsuite/ld-undefined/require-defined-2.d | 8 +
ld/testsuite/ld-undefined/require-defined-3.d | 8 +
ld/testsuite/ld-undefined/require-defined-4.d | 8 +
ld/testsuite/ld-undefined/require-defined-5.d | 10 +
ld/testsuite/ld-undefined/require-defined.exp | 58 +
ld/testsuite/ld-undefined/require-defined.s | 9 +
ld/testsuite/lib/ld-lib.exp | 140 +-
libiberty/ChangeLog | 7 +
libiberty/d-demangle.c | 15 +-
libiberty/testsuite/d-demangle-expected | 22 +-
opcodes/ChangeLog | 15 +
opcodes/ChangeLog-2006 | 20 +-
opcodes/ChangeLog-2007 | 4 +-
opcodes/Makefile.am | 16 +-
opcodes/Makefile.in | 6 +-
opcodes/aarch64-gen.c | 2 +-
opcodes/aarch64-tbl.h | 2 +-
opcodes/alpha-opc.c | 2 +-
opcodes/arc-dis.c | 6 +-
opcodes/arc-dis.h | 8 +-
opcodes/arc-ext.h | 10 +-
opcodes/arm-dis.c | 114 +-
opcodes/avr-dis.c | 42 +-
opcodes/cgen-asm.c | 2 +-
opcodes/cgen-asm.in | 36 +-
opcodes/cgen-dis.c | 2 +-
opcodes/cgen-dis.in | 8 +-
opcodes/cgen-ibld.in | 4 +-
opcodes/cgen-opc.c | 6 +-
opcodes/cgen.sh | 2 +-
opcodes/configure.ac | 6 +-
opcodes/configure.com | 4 +-
opcodes/cr16-dis.c | 8 +-
opcodes/cris-dis.c | 2 +-
opcodes/crx-dis.c | 12 +-
opcodes/d10v-opc.c | 2 +-
opcodes/d30v-opc.c | 2 +-
opcodes/dis-buf.c | 2 +-
opcodes/dlx-dis.c | 2 +-
opcodes/epiphany-asm.c | 38 +-
opcodes/epiphany-desc.c | 186 +-
opcodes/epiphany-dis.c | 10 +-
opcodes/epiphany-ibld.c | 8 +-
opcodes/fr30-asm.c | 38 +-
opcodes/fr30-desc.c | 102 +-
opcodes/fr30-dis.c | 12 +-
opcodes/fr30-ibld.c | 8 +-
opcodes/frv-asm.c | 66 +-
opcodes/frv-desc.c | 182 +-
opcodes/frv-dis.c | 12 +-
opcodes/frv-ibld.c | 8 +-
opcodes/frv-opc.c | 10 +-
opcodes/h8300-dis.c | 32 +-
opcodes/i370-opc.c | 2 +-
opcodes/i386-gen.c | 2 +-
opcodes/i386-init.h | 2 +-
opcodes/i386-opc.h | 2 +-
opcodes/i860-dis.c | 12 +-
opcodes/ia64-asmtab.c | 2778 ++++++++++----------
opcodes/ia64-asmtab.h | 12 +-
opcodes/ia64-dis.c | 2 +-
opcodes/ia64-gen.c | 136 +-
opcodes/ia64-opc-m.c | 8 +-
opcodes/ip2k-asm.c | 58 +-
opcodes/ip2k-desc.c | 30 +-
opcodes/ip2k-dis.c | 10 +-
opcodes/ip2k-ibld.c | 8 +-
opcodes/ip2k-opc.c | 2 +-
opcodes/iq2000-asm.c | 48 +-
opcodes/iq2000-desc.c | 68 +-
opcodes/iq2000-dis.c | 10 +-
opcodes/iq2000-ibld.c | 8 +-
opcodes/lm32-asm.c | 38 +-
opcodes/lm32-desc.c | 40 +-
opcodes/lm32-dis.c | 10 +-
opcodes/lm32-ibld.c | 8 +-
opcodes/lm32-opc.h | 2 +-
opcodes/m10200-dis.c | 12 +-
opcodes/m10200-opc.c | 10 +-
opcodes/m10300-opc.c | 24 +-
opcodes/m32c-asm.c | 78 +-
opcodes/m32c-desc.c | 422 ++--
opcodes/m32c-dis.c | 14 +-
opcodes/m32c-ibld.c | 8 +-
opcodes/m32c-opc.c | 8 +-
opcodes/m32r-asm.c | 38 +-
opcodes/m32r-desc.c | 60 +-
opcodes/m32r-dis.c | 10 +-
opcodes/m32r-ibld.c | 8 +-
opcodes/m68hc11-dis.c | 4 +-
opcodes/m68hc11-opc.c | 2 +-
opcodes/m68k-dis.c | 6 +-
opcodes/m68k-opc.c | 18 +-
opcodes/m88k-dis.c | 14 +-
opcodes/makefile.vms | 4 +-
opcodes/mcore-opc.h | 4 +-
opcodes/mep-asm.c | 74 +-
opcodes/mep-desc.c | 298 ++--
opcodes/mep-dis.c | 50 +-
opcodes/mep-ibld.c | 8 +-
opcodes/mep-opc.h | 2 +-
opcodes/microblaze-dis.h | 4 +-
opcodes/microblaze-opc.h | 44 +-
opcodes/microblaze-opcm.h | 16 +-
opcodes/mips-dis.c | 6 +-
opcodes/mips-opc.c | 9 +-
opcodes/moxie-dis.c | 2 +-
opcodes/msp430-decode.c | 86 +-
opcodes/msp430-dis.c | 18 +-
opcodes/mt-asm.c | 56 +-
opcodes/mt-desc.c | 114 +-
opcodes/mt-dis.c | 10 +-
opcodes/mt-ibld.c | 8 +-
opcodes/mt-opc.c | 2 +-
opcodes/nios2-dis.c | 10 +-
opcodes/ns32k-dis.c | 6 +-
opcodes/opintl.h | 2 +-
opcodes/or1k-asm.c | 38 +-
opcodes/or1k-desc.c | 66 +-
opcodes/or1k-dis.c | 10 +-
opcodes/or1k-ibld.c | 8 +-
opcodes/ppc-dis.c | 2 +-
opcodes/ppc-opc.c | 120 +-
opcodes/rl78-decode.c | 752 +++---
opcodes/rl78-decode.opc | 18 +-
opcodes/rl78-dis.c | 4 +-
opcodes/rx-decode.c | 462 ++--
opcodes/rx-decode.opc | 8 +-
opcodes/score-dis.c | 96 +-
opcodes/score-opc.h | 74 +-
opcodes/score7-dis.c | 70 +-
opcodes/sh-dis.c | 2 +-
opcodes/sh-opc.h | 12 +-
opcodes/sh64-opc.c | 2 +-
opcodes/sparc-dis.c | 2 +-
opcodes/spu-opc.c | 6 +-
opcodes/tic80-opc.c | 2 +-
opcodes/v850-opc.c | 8 +-
opcodes/vax-dis.c | 4 +-
opcodes/w65-opc.h | 2 +-
opcodes/xc16x-asm.c | 40 +-
opcodes/xc16x-desc.c | 134 +-
opcodes/xc16x-dis.c | 10 +-
opcodes/xc16x-ibld.c | 8 +-
opcodes/xc16x-opc.c | 2 +-
opcodes/xstormy16-asm.c | 52 +-
opcodes/xstormy16-desc.c | 82 +-
opcodes/xstormy16-dis.c | 10 +-
opcodes/xstormy16-ibld.c | 8 +-
opcodes/xtensa-dis.c | 4 +-
opcodes/z80-dis.c | 4 +-
sim/m32c/ChangeLog | 5 +
sim/m32c/gdb-if.c | 6 +
629 files changed, 20477 insertions(+), 9591 deletions(-)
create mode 100644 binutils/testsuite/binutils-all/strip-12.d
create mode 100644 binutils/testsuite/binutils-all/strip-12.s
create mode 100644 binutils/testsuite/binutils-all/symbols-1.d
create mode 100644 binutils/testsuite/binutils-all/symbols-2.d
create mode 100644 binutils/testsuite/binutils-all/symbols-3.d
create mode 100644 binutils/testsuite/binutils-all/symbols-4.d
create mode 100644 binutils/testsuite/binutils-all/symbols.s
create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12-1.d
create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12-1.s
create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ilp32-1.d
create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ilp32-1.s
create mode 100644 gas/testsuite/gas/aarch64/reloc-tlsldm-page-1.d
create mode 100644 gas/testsuite/gas/aarch64/reloc-tlsldm-page-1.s
create mode 100644 gas/testsuite/gas/aarch64/reloc-tlsldm-page-ilp32-1.d
create mode 100644 gas/testsuite/gas/aarch64/reloc-tlsldm-page-ilp32-1.s
create mode 100644 gas/testsuite/gas/aarch64/reloc-tlsldm_lo12_nc-1.d
create mode 100644 gas/testsuite/gas/aarch64/reloc-tlsldm_lo12_nc-1.s
create mode 100644 gas/testsuite/gas/aarch64/reloc-tlsldm_lo12_nc-ilp32-1.d
create mode 100644 gas/testsuite/gas/aarch64/reloc-tlsldm_lo12_nc-ilp32-1.s
create mode 100644 gdb/gdbserver/linux-aarch32-low.c
create mode 100644 gdb/gdbserver/linux-aarch32-low.h
create mode 100644 gdb/location.c
create mode 100644 gdb/location.h
create mode 100644 gdb/testsuite/gdb.base/checkpoint-ns.exp
create mode 100644 gdb/testsuite/gdb.base/valgrind-disp-step.c
create mode 100644 gdb/testsuite/gdb.base/valgrind-disp-step.exp
create mode 100644 gdb/testsuite/gdb.btrace/tsx.c
create mode 100644 gdb/testsuite/gdb.btrace/tsx.exp
create mode 100644 gdb/testsuite/gdb.btrace/x86-tsx.S
create mode 100644 gdb/testsuite/gdb.linespec/3explicit.c
create mode 100644 gdb/testsuite/gdb.linespec/cpexplicit.cc
create mode 100644 gdb/testsuite/gdb.linespec/cpexplicit.exp
create mode 100644 gdb/testsuite/gdb.linespec/explicit.c
create mode 100644 gdb/testsuite/gdb.linespec/explicit.exp
create mode 100644 gdb/testsuite/gdb.linespec/explicit2.c
create mode 100644 gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.c
create mode 100644 gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp
create mode 100644 gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.c
create mode 100644 gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.exp
create mode 100644 gdb/testsuite/gdb.threads/process-dies-while-handling-bp.c
create mode 100644 gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp
create mode 100644 ld/testsuite/ld-aarch64/emit-relocs-529-overflow.d
create mode 100644 ld/testsuite/ld-aarch64/emit-relocs-529-overflow.s
create mode 100644 ld/testsuite/ld-aarch64/emit-relocs-529.d
create mode 100644 ld/testsuite/ld-aarch64/emit-relocs-529.s
create mode 100644 ld/testsuite/ld-aarch64/emit-relocs-86-overflow.d
create mode 100644 ld/testsuite/ld-aarch64/emit-relocs-86-overflow.s
create mode 100644 ld/testsuite/ld-aarch64/emit-relocs-86.d
create mode 100644 ld/testsuite/ld-aarch64/emit-relocs-86.s
create mode 100644 ld/testsuite/ld-aarch64/farcall-b-defsym.d
create mode 100644 ld/testsuite/ld-aarch64/farcall-b-defsym.s
create mode 100644 ld/testsuite/ld-aarch64/farcall-b-gsym.d
create mode 100644 ld/testsuite/ld-aarch64/farcall-b-gsym.s
create mode 100644 ld/testsuite/ld-aarch64/farcall-b-plt.d
create mode 100644 ld/testsuite/ld-aarch64/farcall-b-plt.s
create mode 100644 ld/testsuite/ld-aarch64/farcall-bl-defsym.d
create mode 100644 ld/testsuite/ld-aarch64/farcall-bl-defsym.s
create mode 100644 ld/testsuite/ld-aarch64/farcall-bl-plt.d
create mode 100644 ld/testsuite/ld-aarch64/farcall-bl-plt.s
create mode 100644 ld/testsuite/ld-aarch64/relocs-1027-symbolic-func.d
rename ld/testsuite/ld-aarch64/{relocs-257-symbolic-func.s => relocs-1027-symbolic-func.s} (100%)
delete mode 100644 ld/testsuite/ld-aarch64/relocs-257-symbolic-func.d
create mode 100644 ld/testsuite/ld-aarch64/tls-small-ld.d
create mode 100644 ld/testsuite/ld-aarch64/tls-small-ld.s
create mode 100644 ld/testsuite/ld-elf/pr18720.out
create mode 100644 ld/testsuite/ld-elf/pr18720a.c
create mode 100644 ld/testsuite/ld-elf/pr18720b.c
create mode 100644 ld/testsuite/ld-elf/pr18720c.c
create mode 100644 ld/testsuite/ld-ifunc/pr18808.out
create mode 100644 ld/testsuite/ld-ifunc/pr18808a.c
create mode 100644 ld/testsuite/ld-ifunc/pr18808b.c
create mode 100644 ld/testsuite/ld-undefined/require-defined-1.d
create mode 100644 ld/testsuite/ld-undefined/require-defined-2.d
create mode 100644 ld/testsuite/ld-undefined/require-defined-3.d
create mode 100644 ld/testsuite/ld-undefined/require-defined-4.d
create mode 100644 ld/testsuite/ld-undefined/require-defined-5.d
create mode 100644 ld/testsuite/ld-undefined/require-defined.exp
create mode 100644 ld/testsuite/ld-undefined/require-defined.s
First 500 lines of diff:
diff --git a/ChangeLog b/ChangeLog
index f8690be..1d080fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2015-08-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ Sync with GCC
+ 2015-07-28 Ben Elliston <bje@gnu.org>
+
+ * config.sub, config.guess: Import from upstream.
+
+2015-08-06 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * Makefile.def (libiconv): Define bootstrap=true.
+ Mark pdf/html/info as missing.
+ (configure-gcc): Depend on all-libiconv.
+ (all-gcc): Ditto.
+ (configure-libcpp): Ditto.
+ (all-libcpp): Ditto.
+ (configure-intl): Ditto.
+ (all-intl): Ditto.
+ * Makefile.in: Regenerate.
+
2015-07-27 H.J. Lu <hongjiu.lu@intel.com>
Sync with GCC
diff --git a/Makefile.def b/Makefile.def
index 4394188..01445e4 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -93,9 +93,12 @@ host_modules= { module= libiberty-linker-plugin; bootstrap=true;
extra_make_flags='@extra_linker_plugin_flags@'; };
// We abuse missing to avoid installing anything for libiconv.
host_modules= { module= libiconv;
+ bootstrap=true;
extra_configure_flags='--disable-shared';
no_install= true;
- missing= install-info;
+ missing= pdf;
+ missing= html;
+ missing= info;
missing= install-pdf;
missing= install-html;
missing= install-info; };
@@ -324,6 +327,7 @@ dependencies = { module=configure-gcc; on=all-gas; };
dependencies = { module=configure-gcc; on=all-ld; };
dependencies = { module=configure-gcc; on=all-gold; };
dependencies = { module=configure-gcc; on=all-libelf; };
+dependencies = { module=configure-gcc; on=all-libiconv; };
dependencies = { module=all-gcc; on=all-libiberty; hard=true; };
dependencies = { module=all-gcc; on=all-intl; };
dependencies = { module=all-gcc; on=all-mpfr; };
@@ -342,6 +346,7 @@ dependencies = { module=all-gcc; on=all-libdecnumber; hard=true; };
dependencies = { module=all-gcc; on=all-libiberty; };
dependencies = { module=all-gcc; on=all-fixincludes; };
dependencies = { module=all-gcc; on=all-lto-plugin; };
+dependencies = { module=all-gcc; on=all-libiconv; };
dependencies = { module=info-gcc; on=all-build-libiberty; };
dependencies = { module=dvi-gcc; on=all-build-libiberty; };
dependencies = { module=pdf-gcc; on=all-build-libiberty; };
@@ -353,8 +358,10 @@ dependencies = { module=install-strip-gcc ; on=install-strip-lto-plugin; };
dependencies = { module=configure-libcpp; on=configure-libiberty; hard=true; };
dependencies = { module=configure-libcpp; on=configure-intl; };
+dependencies = { module=configure-libcpp; on=all-libiconv; };
dependencies = { module=all-libcpp; on=all-libiberty; hard=true; };
dependencies = { module=all-libcpp; on=all-intl; };
+dependencies = { module=all-libcpp; on=all-libiconv; };
dependencies = { module=all-fixincludes; on=all-libiberty; };
@@ -373,9 +380,11 @@ dependencies = { module=all-gotools; on=all-target-libgo; };
dependencies = { module=all-utils; on=all-libiberty; };
+dependencies = { module=configure-intl; on=all-libiconv; };
dependencies = { module=configure-mpfr; on=all-gmp; };
dependencies = { module=configure-mpc; on=all-mpfr; };
dependencies = { module=configure-isl; on=all-gmp; };
+dependencies = { module=all-intl; on=all-libiconv; };
// Host modules specific to gdb.
dependencies = { module=configure-gdb; on=all-intl; };
diff --git a/Makefile.in b/Makefile.in
index cfc1035..13f3740 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1079,7 +1079,9 @@ all-host: maybe-all-libiberty
@if libiberty-linker-plugin-no-bootstrap
all-host: maybe-all-libiberty-linker-plugin
@endif libiberty-linker-plugin-no-bootstrap
+@if libiconv-no-bootstrap
all-host: maybe-all-libiconv
+@endif libiconv-no-bootstrap
all-host: maybe-all-m4
all-host: maybe-all-readline
all-host: maybe-all-sid
@@ -24134,7 +24136,6 @@ configure-libiconv: stage_current
@if libiconv
maybe-configure-libiconv: configure-libiconv
configure-libiconv:
- @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
@@ -24158,6 +24159,211 @@ configure-libiconv:
+.PHONY: configure-stage1-libiconv maybe-configure-stage1-libiconv
+maybe-configure-stage1-libiconv:
+@if libiconv-bootstrap
+maybe-configure-stage1-libiconv: configure-stage1-libiconv
+configure-stage1-libiconv:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE1_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/libiconv; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv; \
+ cd $(HOST_SUBDIR)/libiconv || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiconv/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libiconv; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ \
+ $(STAGE1_CONFIGURE_FLAGS) \
+ --disable-shared
+@endif libiconv-bootstrap
+
+.PHONY: configure-stage2-libiconv maybe-configure-stage2-libiconv
+maybe-configure-stage2-libiconv:
+@if libiconv-bootstrap
+maybe-configure-stage2-libiconv: configure-stage2-libiconv
+configure-stage2-libiconv:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE2_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/libiconv; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv; \
+ cd $(HOST_SUBDIR)/libiconv || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiconv/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libiconv; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE2_CONFIGURE_FLAGS) \
+ --disable-shared
+@endif libiconv-bootstrap
+
+.PHONY: configure-stage3-libiconv maybe-configure-stage3-libiconv
+maybe-configure-stage3-libiconv:
+@if libiconv-bootstrap
+maybe-configure-stage3-libiconv: configure-stage3-libiconv
+configure-stage3-libiconv:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE3_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/libiconv; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv; \
+ cd $(HOST_SUBDIR)/libiconv || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiconv/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libiconv; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE3_CONFIGURE_FLAGS) \
+ --disable-shared
+@endif libiconv-bootstrap
+
+.PHONY: configure-stage4-libiconv maybe-configure-stage4-libiconv
+maybe-configure-stage4-libiconv:
+@if libiconv-bootstrap
+maybe-configure-stage4-libiconv: configure-stage4-libiconv
+configure-stage4-libiconv:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE4_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/libiconv; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv; \
+ cd $(HOST_SUBDIR)/libiconv || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiconv/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libiconv; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE4_CONFIGURE_FLAGS) \
+ --disable-shared
+@endif libiconv-bootstrap
+
+.PHONY: configure-stageprofile-libiconv maybe-configure-stageprofile-libiconv
+maybe-configure-stageprofile-libiconv:
+@if libiconv-bootstrap
+maybe-configure-stageprofile-libiconv: configure-stageprofile-libiconv
+configure-stageprofile-libiconv:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEprofile_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/libiconv; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv; \
+ cd $(HOST_SUBDIR)/libiconv || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiconv/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libiconv; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGEprofile_CONFIGURE_FLAGS) \
+ --disable-shared
+@endif libiconv-bootstrap
+
+.PHONY: configure-stagefeedback-libiconv maybe-configure-stagefeedback-libiconv
+maybe-configure-stagefeedback-libiconv:
+@if libiconv-bootstrap
+maybe-configure-stagefeedback-libiconv: configure-stagefeedback-libiconv
+configure-stagefeedback-libiconv:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEfeedback_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/libiconv; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv; \
+ cd $(HOST_SUBDIR)/libiconv || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiconv/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libiconv; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGEfeedback_CONFIGURE_FLAGS) \
+ --disable-shared
+@endif libiconv-bootstrap
+
+
+
.PHONY: all-libiconv maybe-all-libiconv
@@ -24169,7 +24375,6 @@ all-libiconv: stage_current
TARGET-libiconv=all
maybe-all-libiconv: all-libiconv
all-libiconv: configure-libiconv
- @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
@@ -24180,6 +24385,255 @@ all-libiconv: configure-libiconv
+.PHONY: all-stage1-libiconv maybe-all-stage1-libiconv
+.PHONY: clean-stage1-libiconv maybe-clean-stage1-libiconv
+maybe-all-stage1-libiconv:
+maybe-clean-stage1-libiconv:
+@if libiconv-bootstrap
+maybe-all-stage1-libiconv: all-stage1-libiconv
+all-stage1: all-stage1-libiconv
+TARGET-stage1-libiconv = $(TARGET-libiconv)
+all-stage1-libiconv: configure-stage1-libiconv
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE1_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" \
+ CXXFLAGS="$(STAGE1_CXXFLAGS)" \
+ LIBCFLAGS="$(LIBCFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGE1_TFLAGS)" \
+ $(TARGET-stage1-libiconv)
+
+maybe-clean-stage1-libiconv: clean-stage1-libiconv
+clean-stage1: clean-stage1-libiconv
+clean-stage1-libiconv:
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(HOST_SUBDIR)/libiconv/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage1-libiconv/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) clean
+@endif libiconv-bootstrap
+
+
+.PHONY: all-stage2-libiconv maybe-all-stage2-libiconv
+.PHONY: clean-stage2-libiconv maybe-clean-stage2-libiconv
+maybe-all-stage2-libiconv:
+maybe-clean-stage2-libiconv:
+@if libiconv-bootstrap
+maybe-all-stage2-libiconv: all-stage2-libiconv
+all-stage2: all-stage2-libiconv
+TARGET-stage2-libiconv = $(TARGET-libiconv)
+all-stage2-libiconv: configure-stage2-libiconv
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE2_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE2_CFLAGS)" \
+ CXXFLAGS="$(STAGE2_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGE2_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGE2_TFLAGS)" \
+ $(TARGET-stage2-libiconv)
+
+maybe-clean-stage2-libiconv: clean-stage2-libiconv
+clean-stage2: clean-stage2-libiconv
+clean-stage2-libiconv:
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(HOST_SUBDIR)/libiconv/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage2-libiconv/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+@endif libiconv-bootstrap
+
+
+.PHONY: all-stage3-libiconv maybe-all-stage3-libiconv
+.PHONY: clean-stage3-libiconv maybe-clean-stage3-libiconv
+maybe-all-stage3-libiconv:
+maybe-clean-stage3-libiconv:
+@if libiconv-bootstrap
+maybe-all-stage3-libiconv: all-stage3-libiconv
+all-stage3: all-stage3-libiconv
+TARGET-stage3-libiconv = $(TARGET-libiconv)
+all-stage3-libiconv: configure-stage3-libiconv
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE3_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE3_CFLAGS)" \
+ CXXFLAGS="$(STAGE3_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGE3_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGE3_TFLAGS)" \
+ $(TARGET-stage3-libiconv)
+
+maybe-clean-stage3-libiconv: clean-stage3-libiconv
+clean-stage3: clean-stage3-libiconv
+clean-stage3-libiconv:
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(HOST_SUBDIR)/libiconv/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage3-libiconv/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+@endif libiconv-bootstrap
+
+
+.PHONY: all-stage4-libiconv maybe-all-stage4-libiconv
+.PHONY: clean-stage4-libiconv maybe-clean-stage4-libiconv
+maybe-all-stage4-libiconv:
+maybe-clean-stage4-libiconv:
+@if libiconv-bootstrap
+maybe-all-stage4-libiconv: all-stage4-libiconv
+all-stage4: all-stage4-libiconv
+TARGET-stage4-libiconv = $(TARGET-libiconv)
+all-stage4-libiconv: configure-stage4-libiconv
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE4_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE4_CFLAGS)" \
+ CXXFLAGS="$(STAGE4_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGE4_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGE4_TFLAGS)" \
+ $(TARGET-stage4-libiconv)
+
+maybe-clean-stage4-libiconv: clean-stage4-libiconv
+clean-stage4: clean-stage4-libiconv
+clean-stage4-libiconv:
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(HOST_SUBDIR)/libiconv/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage4-libiconv/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+@endif libiconv-bootstrap
+
+
+.PHONY: all-stageprofile-libiconv maybe-all-stageprofile-libiconv
+.PHONY: clean-stageprofile-libiconv maybe-clean-stageprofile-libiconv
+maybe-all-stageprofile-libiconv:
+maybe-clean-stageprofile-libiconv:
+@if libiconv-bootstrap
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-08-16 20:12 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-13 10:40 [SCM] jankratochvil/gdbserverbuildid: sticky jkratoch
-- strict thread matches above, loose matches on Subject: below --
2015-08-16 20:12 jkratoch
2015-08-15 10:01 jkratoch
2015-08-13 19:02 jkratoch
2015-08-13 14:22 jkratoch
2015-08-12 20:24 jkratoch
2015-08-12 17:12 jkratoch
2015-08-12 16:28 jkratoch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).