public inbox for archer-commits@sourceware.org help / color / mirror / Atom feed
From: jkratoch@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] jankratochvil/gdbserverbuildid: Tests for validate symbol file using build-id Date: Wed, 19 Mar 2014 22:17:00 -0000 [thread overview] Message-ID: <20140319221724.4257.qmail@sourceware.org> (raw) The branch, jankratochvil/gdbserverbuildid has been updated discards 15a8a61a24feec0d72fb9b2ac595a692a7b319ae (commit) discards 4a392695fafb09376ba4af36a063ca5f1e073ac0 (commit) discards d20ab6c71dbc82c0054cefe7172221f4f988b130 (commit) discards 7118d91db83eea8936692946870089f62214b24c (commit) discards 77f6badca315bafdccdc669b77c72c82eb4dcea0 (commit) discards a4f0f78dea4bc7c217f37eeb96d152c94d17144f (commit) via 4e3ec3ff77577a847700893cf308ba1bc6b32b8a (commit) via 9914a76a05357603ccdc3a41a399ee125053e66d (commit) via 55ec4dcef3e4b3a36d010dff32127ffacea743b9 (commit) via 9ebd029d44030aee8b537108beba069788d68839 (commit) via 6e94d1ef1cde4ba4e38606c4d0f9a20f90fc8fb5 (commit) via b007f850d5490d5947663932482cd682f3fea6cd (commit) from 15a8a61a24feec0d72fb9b2ac595a692a7b319ae (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 4e3ec3ff77577a847700893cf308ba1bc6b32b8a Author: Jan Kratochvil <jan.kratochvil@redhat.com> Date: Sun Mar 9 19:51:37 2014 +0100 Tests for validate symbol file using build-id Hi, new testcase. Jan gdb/testsuite/ 2014-02-26 Aleksandar Ristovski <aristovski@qnx.com Tests for validate symbol file using build-id. * gdb.server/solib-mismatch-lib.c: New file. * gdb.server/solib-mismatch-libmod.c: New file. * gdb.server/solib-mismatch.c: New file. * gdb.server/solib-mismatch.exp: New file. commit 9914a76a05357603ccdc3a41a399ee125053e66d Author: Jan Kratochvil <jan.kratochvil@redhat.com> Date: Wed Mar 19 21:39:22 2014 +0100 Validate symbol file using build-id Hi, consumer part of the "build-id" attribute. Jan gdb/ 2014-02-26 Aleksandar Ristovski <aristovski@qnx.com Jan Kratochvil <jan.kratochvil@redhat.com> Validate symbol file using build-id. * NEWS (Changes since GDB 7.7): Add 'set solib-build-id-force' and 'show solib-build-id-force'. 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-ia64-hpux.c (ia64_hpux_target_so_ops): Ditto. * solib-irix.c (_initialize_irix_solib): Ditto. * solib-osf.c (_initialize_osf_solib): Ditto. * solib-pa64.c (_initialize_pa64_solib): Ditto. * solib-som.c (_initialize_som_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. (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 (solib_build_id_force, show_solib_build_id_force): New. (solib_map_sections): Use ops->validate. (clear_so): Free build_id. (default_solib_validate): New function. (_initialize_solib): Add "solib-build-id-force". * 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/ 2014-03-02 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.texinfo (Files): Add 'set solib-build-id-force' and 'show solib-build-id-force'. commit 55ec4dcef3e4b3a36d010dff32127ffacea743b9 Author: Jan Kratochvil <jan.kratochvil@redhat.com> Date: Wed Mar 19 21:39:21 2014 +0100 gdbserver build-id attribute generator Hi, producer part of the new "build-id" XML attribute. Jan gdb/ 2014-02-26 Aleksandar Ristovski <aristovski@qnx.com gdbserver build-id attribute generator. * features/library-list-svr4.dtd (library-list-svr4): New 'build-id' attribute. gdb/doc/ 2014-02-26 Aleksandar Ristovski <aristovski@qnx.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/ 2014-02-26 Aleksandar Ristovski <aristovski@qnx.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 9ebd029d44030aee8b537108beba069788d68839 Author: Jan Kratochvil <jan.kratochvil@redhat.com> Date: Wed Mar 19 21:39:21 2014 +0100 Move linux_find_memory_regions_full & co. Hi, this should be just a move with no changes. Jan gdb/ 2014-02-26 Aleksandar Ristovski <aristovski@qnx.com Move linux_find_memory_regions_full & co. * common/target-utils.c (string.h, gdb_assert.h): Include. (read_alloc, read_stralloc): Move definitions from target.c. * common/target-utils.h (read_alloc_pread_ftype): New typedef. (read_alloc): New declaration. (read_stralloc_func_ftype): New typedef. (read_stralloc): New declaration. * common/linux-maps.c (fcntl.h, unistd.h, target.h, gdb_assert.h) (ctype.h, string.h, target-utils.h): Include. (read_mapping): Move from linux-tdep.c. [GDBSERVER] (linux_find_memory_read_stralloc_1_pread): New function. [GDBSERVER] (linux_find_memory_read_stralloc_1): New function. (linux_find_memory_read_stralloc): New function. (linux_find_memory_regions_full): Move from linux-tdep.c. * common/linux-maps.h (read_mapping): New declaration. (linux_find_memory_region_ftype): Moved typedef from linux-tdep.c. (linux_find_memory_regions_full): New declaration. * linux-tdep.c (linux-maps.h): Include. (read_mapping): 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. * target.c (target-utils.h): Include. (read_alloc_pread_ftype): Moved typedef to common/target-utils.h. (read_alloc, read_stralloc): Moved definitions to common/target-utils.c. commit 6e94d1ef1cde4ba4e38606c4d0f9a20f90fc8fb5 Author: Jan Kratochvil <jan.kratochvil@redhat.com> Date: Wed Mar 19 21:39:21 2014 +0100 Prepare linux_find_memory_regions_full & co. for move Hi, prepare code for move into gdb/common/. Jan gdb/ 2014-02-26 Aleksandar Ristovski <aristovski@qnx.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 b007f850d5490d5947663932482cd682f3fea6cd Author: Jan Kratochvil <jan.kratochvil@redhat.com> Date: Wed Mar 19 21:39:20 2014 +0100 Create empty common/linux-maps.[ch] and common/target-utils.[ch] Hi, prepare new files for later move. Jan gdb/ 2014-02-26 Aleksandar Ristovski <aristovski@qnx.com Create empty common/linux-maps.[ch] and common/target-utils.[ch]. * Makefile.in (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. * common/target-utils.c: New file. * common/target-utils.h: New file. * common/linux-maps.c: New file. * common/linux-maps.h: New file. * config/i386/linux.mh (NATDEPFILES): Add linux-maps.o. * config/i386/linux64.mh (NATDEPFILES): Ditto. gdb/gdbserver/ 2014-02-26 Aleksandar Ristovski <aristovski@qnx.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. ----------------------------------------------------------------------- Summary of changes: gdb/Makefile.in | 8 ++++---- gdb/common/linux-maps.c | 2 +- gdb/common/{common-target.c => target-utils.c} | 2 +- gdb/common/{common-target.h => target-utils.h} | 6 +++--- gdb/doc/gdb.texinfo | 19 +++++++++++-------- gdb/gdbserver/Makefile.in | 4 ++-- gdb/target.c | 2 +- .../{gdb.base => gdb.server}/solib-mismatch-lib.c | 0 .../solib-mismatch-libmod.c | 0 .../{gdb.base => gdb.server}/solib-mismatch.c | 4 ++-- .../{gdb.base => gdb.server}/solib-mismatch.exp | 19 ++++++++----------- 11 files changed, 33 insertions(+), 33 deletions(-) rename gdb/common/{common-target.c => target-utils.c} (99%) rename gdb/common/{common-target.h => target-utils.h} (93%) rename gdb/testsuite/{gdb.base => gdb.server}/solib-mismatch-lib.c (100%) rename gdb/testsuite/{gdb.base => gdb.server}/solib-mismatch-libmod.c (100%) rename gdb/testsuite/{gdb.base => gdb.server}/solib-mismatch.c (91%) rename gdb/testsuite/{gdb.base => gdb.server}/solib-mismatch.exp (89%) First 500 lines of diff: diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 1e2c5f6..2dc5c47 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -924,7 +924,7 @@ common/linux-osdata.h gdb-dlfcn.h auto-load.h probe.h stap-probe.h \ gdb_bfd.h sparc-ravenscar-thread.h ppc-ravenscar-thread.h common/linux-btrace.h \ ctf.h common/i386-cpuid.h common/i386-gcc-cpuid.h target/resume.h \ target/wait.h target/waitstatus.h nat/linux-nat.h nat/linux-waitpid.h \ -common/print-utils.h common/rsp-low.h common/common-target.h +common/print-utils.h common/rsp-low.h common/target-utils.h # Header files that already have srcdir in them, or which are in objdir. @@ -1023,7 +1023,7 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \ gdb_vecs.o jit.o progspace.o skip.o probe.o \ common-utils.o buffer.o ptid.o gdb-dlfcn.o common-agent.o \ format.o registry.o btrace.o record-btrace.o waitstatus.o \ - print-utils.o rsp-low.o common-target.o + print-utils.o rsp-low.o target-utils.o TSOBS = inflow.o @@ -2137,8 +2137,8 @@ common-agent.o: $(srcdir)/common/agent.c $(COMPILE) $(srcdir)/common/agent.c $(POSTCOMPILE) -common-target.o: ${srcdir}/common/common-target.c - $(COMPILE) $(srcdir)/common/common-target.c +target-utils.o: ${srcdir}/common/target-utils.c + $(COMPILE) $(srcdir)/common/target-utils.c $(POSTCOMPILE) vec.o: ${srcdir}/common/vec.c diff --git a/gdb/common/linux-maps.c b/gdb/common/linux-maps.c index bb587df..4d0b973 100644 --- a/gdb/common/linux-maps.c +++ b/gdb/common/linux-maps.c @@ -29,7 +29,7 @@ #include "gdb_assert.h" #include <ctype.h> #include <string.h> -#include "common-target.h" +#include "target-utils.h" /* Service function for corefiles and info proc. */ diff --git a/gdb/common/common-target.c b/gdb/common/target-utils.c similarity index 99% rename from gdb/common/common-target.c rename to gdb/common/target-utils.c index d6e5d60..84d1bca 100644 --- a/gdb/common/common-target.c +++ b/gdb/common/target-utils.c @@ -24,7 +24,7 @@ #endif #include <string.h> -#include "common-target.h" +#include "target-utils.h" #include "gdb_assert.h" LONGEST diff --git a/gdb/common/common-target.h b/gdb/common/target-utils.h similarity index 93% rename from gdb/common/common-target.h rename to gdb/common/target-utils.h index 9aedc12..f8ca972 100644 --- a/gdb/common/common-target.h +++ b/gdb/common/target-utils.h @@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef COMMON_COMMON_TARGET_H -#define COMMON_COMMON_TARGET_H +#ifndef COMMON_TARGET_UTILS_H +#define COMMON_TARGET_UTILS_H typedef int (read_alloc_pread_ftype) (int handle, gdb_byte *read_buf, int len, ULONGEST offset, int *target_errno); @@ -31,4 +31,4 @@ typedef LONGEST (read_stralloc_func_ftype) (const char *filename, extern char *read_stralloc (const char *filename, read_stralloc_func_ftype *func); -#endif /* COMMON_COMMON_TARGET_H */ +#endif /* COMMON_TARGET_UTILS_H */ diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index ebdc9ea..a4af3ec 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -17125,21 +17125,24 @@ By default @value{GDBN} will ignore symbol files with non-matching build-id while printing: @smallexample - Shared object "libfoo.so.1" could not be validated and will be ignored; - or use 'set solib-build-id-force'. + warning: Shared object "libfoo.so.1" could not be validated (remote + build ID 2bc1745e does not match local build ID a08f8767) and will be + ignored; or use 'set solib-build-id-force'. @end smallexample Turning on this setting would load such symbol file while still printing: @smallexample - Shared object "libfoo.so.1" could not be validated but it is being loaded - due to 'set solib-build-id-force'. + warning: Shared object "libfoo.so.1" could not be validated (remote + build ID 2bc1745e does not match local build ID a08f8767) but it is + being loaded due to 'set solib-build-id-force'. @end smallexample -If both build-ids are present but they do not match then this setting -enables (@var{mode} is @code{on}) or disables (@var{mode} is @code{off}) -loading of such symbol file. On systems where build-id is not present -in files this setting has no effect. The default value is @code{off}. +If remote build-id is present but it does not match local build-id (or local +build-id is not present) then this setting enables (@var{mode} is @code{on}) or +disables (@var{mode} is @code{off}) loading of such symbol file. On systems +where build-id is not present in the remote system this setting has no effect. +The default value is @code{off}. Loading non-matching symbol file may confuse debugging including breakage of backtrace output. diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in index 4ae4702..7d267f7 100644 --- a/gdb/gdbserver/Makefile.in +++ b/gdb/gdbserver/Makefile.in @@ -177,7 +177,7 @@ OBS = agent.o ax.o inferiors.o regcache.o remote-utils.o server.o signals.o \ target.o waitstatus.o utils.o debug.o version.o vec.o gdb_vecs.o \ mem-break.o hostio.o event-loop.o tracepoint.o xml-utils.o \ common-utils.o ptid.o buffer.o format.o filestuff.o dll.o notif.o \ - tdesc.o print-utils.o rsp-low.o common-target.o \ + tdesc.o print-utils.o rsp-low.o target-utils.o \ $(XML_BUILTIN) $(DEPFILES) $(LIBOBJS) GDBREPLAY_OBS = gdbreplay.o version.o GDBSERVER_LIBS = @GDBSERVER_LIBS@ @@ -502,7 +502,7 @@ linux-procfs.o: ../common/linux-procfs.c linux-ptrace.o: ../common/linux-ptrace.c $(COMPILE) $< $(POSTCOMPILE) -common-target.o: ../common/common-target.c +target-utils.o: ../common/target-utils.c $(COMPILE) $< $(POSTCOMPILE) common-utils.o: ../common/common-utils.c diff --git a/gdb/target.c b/gdb/target.c index fa51952..0e5ea33 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -45,7 +45,7 @@ #include "gdb/fileio.h" #include "agent.h" #include "auxv.h" -#include "common-target.h" +#include "target-utils.h" static void target_info (char *, int); diff --git a/gdb/testsuite/gdb.base/solib-mismatch-lib.c b/gdb/testsuite/gdb.server/solib-mismatch-lib.c similarity index 100% rename from gdb/testsuite/gdb.base/solib-mismatch-lib.c rename to gdb/testsuite/gdb.server/solib-mismatch-lib.c diff --git a/gdb/testsuite/gdb.base/solib-mismatch-libmod.c b/gdb/testsuite/gdb.server/solib-mismatch-libmod.c similarity index 100% rename from gdb/testsuite/gdb.base/solib-mismatch-libmod.c rename to gdb/testsuite/gdb.server/solib-mismatch-libmod.c diff --git a/gdb/testsuite/gdb.base/solib-mismatch.c b/gdb/testsuite/gdb.server/solib-mismatch.c similarity index 91% rename from gdb/testsuite/gdb.base/solib-mismatch.c rename to gdb/testsuite/gdb.server/solib-mismatch.c index 7bf425d..c8be18a 100644 --- a/gdb/testsuite/gdb.base/solib-mismatch.c +++ b/gdb/testsuite/gdb.server/solib-mismatch.c @@ -22,9 +22,9 @@ #include <signal.h> #include <string.h> -/* The following defines must correspond to solib-mismatch.exp */ +/* The following defines must correspond to solib-mismatch.exp . */ -/* DIRNAME must be defined at compile time. */ +/* DIRNAME and LIB must be defined at compile time. */ #ifndef DIRNAME #error DIRNAME not defined #endif diff --git a/gdb/testsuite/gdb.base/solib-mismatch.exp b/gdb/testsuite/gdb.server/solib-mismatch.exp similarity index 89% rename from gdb/testsuite/gdb.base/solib-mismatch.exp rename to gdb/testsuite/gdb.server/solib-mismatch.exp index 0048213..9dbce7f 100644 --- a/gdb/testsuite/gdb.base/solib-mismatch.exp +++ b/gdb/testsuite/gdb.server/solib-mismatch.exp @@ -82,7 +82,7 @@ if { [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfilerun}" "${binlibfilerun} return -1 } -proc solib_matching_test { solibfile symsloaded msg } { +proc solib_matching_test { solibfile symsloaded } { global gdb_prompt global testfile global executable @@ -116,7 +116,7 @@ proc solib_matching_test { solibfile symsloaded msg } { gdb_test "info sharedlibrary ${solibfile}" \ "${expected_header}\r\n.*${expected_line}.*" \ - "${msg} - Symbols for ${solibfile} loaded: expected '${symsloaded}'" + "Symbols for ${solibfile} loaded: expected '${symsloaded}'" return 0 } @@ -127,9 +127,8 @@ file copy -force "${binlibfiledirgdb}/${executable}" \ "${binlibfiledirrun}/${executable}" # Test unstripped, .dynamic matching -if { [solib_matching_test "${binlibfilebase}" "No" \ - "test unstripped, .dynamic matching"] != 0 } { - untested "test unstripped, .dynamic matching" +with_test_prefix "test unstripped, .dynamic matching" { + solib_matching_test "${binlibfilebase}" "No" } # Keep original so for debugging purposes @@ -141,9 +140,8 @@ if {$result != 0} { } # Test --only-keep-debug, .dynamic matching so -if { [solib_matching_test "${binlibfilebase}" "No" \ - "test --only-keep-debug"] != 0 } { - untested "test --only-keep-debug" +with_test_prefix "test --only-keep-debug" { + solib_matching_test "${binlibfilebase}" "No" } # Keep previous so for debugging puroses @@ -153,7 +151,6 @@ file copy -force "${binlibfilegdb}" "${binlibfilegdb}-orig1" file copy -force "${binlibfilerun}" "${binlibfilegdb}" # Now test it does not mis-invalidate matching libraries -if { [solib_matching_test "${binlibfilebase}" "Yes" \ - "test matching libraries"] } { - untested "test matching libraries" +with_test_prefix "test matching libraries" { + solib_matching_test "${binlibfilebase}" "Yes" } hooks/post-receive -- Repository for Project Archer.
next reply other threads:[~2014-03-19 22:17 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-03-19 22:17 jkratoch [this message] -- strict thread matches above, loose matches on Subject: below -- 2015-08-03 20:36 jkratoch 2015-07-23 17:19 jkratoch 2015-06-21 10:15 jkratoch 2015-06-14 19:25 jkratoch 2015-06-07 20:03 jkratoch 2015-06-07 20:02 jkratoch 2014-03-19 21:22 jkratoch 2014-03-08 19:58 jkratoch 2014-03-03 20:58 jkratoch 2014-03-02 19:50 jkratoch 2014-03-02 18:52 jkratoch 2014-03-02 9:51 jkratoch
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20140319221724.4257.qmail@sourceware.org \ --to=jkratoch@sourceware.org \ --cc=archer-commits@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).