From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8953 invoked by alias); 31 Jul 2015 20:27:38 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 8930 invoked by uid 9674); 31 Jul 2015 20:27:38 -0000 Date: Fri, 31 Jul 2015 20:27:00 -0000 Message-ID: <20150731202738.8882.qmail@sourceware.org> From: jkratoch@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] jankratochvil/gdbserverbuildid2: buildidwarn X-Git-Refname: refs/heads/jankratochvil/gdbserverbuildid2 X-Git-Reftype: branch X-Git-Oldrev: 8274a0f57cae1b111180eda9cf17fa404147f6b7 X-Git-Newrev: 52e94ef20f0a2821b4218b5412aa3448ec612a3a X-SW-Source: 2015-q3/txt/msg00011.txt.bz2 List-Id: The branch, jankratochvil/gdbserverbuildid2 has been updated discards 8274a0f57cae1b111180eda9cf17fa404147f6b7 (commit) discards 47064c63501b06767a66a733c0a09dd618e3cb87 (commit) discards 0c3319418b1c6a86d0d287b7c3f264b52465d2a8 (commit) discards 7502e0f27a4c4cc2de93772cec605433f72da870 (commit) discards 6f6dc7ffcfa08facd55e55e9889156b36085d9d3 (commit) discards ca2b6169c11f974af7944bee906612b21372c9b4 (commit) discards ca6232d06bc4517a99919e29e91f515bef5fb162 (commit) discards be6b238478be554663c3fe3324488841ff13c4e7 (commit) discards 600a5e1c4f32c2c6b31cb856553c36a365a5580a (commit) discards 8cce31c49ad425dd1b23f5ff3b18e6ba928c5492 (commit) discards deea42476fd8f7f148f5a0f76d157b03fb751246 (commit) via 52e94ef20f0a2821b4218b5412aa3448ec612a3a (commit) via 2d7f93fff19c806dd0567c58f06ee8c95014ac91 (commit) via a17cefb1a3689e04e1cf06f075f1e38bcbb98cae (commit) via ff2f924406cc046c67a53c401f903c2fe399dbfb (commit) via 4b23b94c23cef3b156928540ff935dc880814907 (commit) via d6f35619ecaf9c7b3e2f0ed9f430a8832ff4a866 (commit) via ac9889e2f97ca0b02c8864e6bf0fec61564d009f (commit) via ba9310665b459c0d53cb25f12ebbc0b751b7546a (commit) via 4eb86256c28b998687a8743c06ad7d111cf1f936 (commit) via e3a6fc81d5e6caff5d58562d178628e8a575d684 (commit) via 28202d6392adab7179a849c7b569c24427f09476 (commit) from 8274a0f57cae1b111180eda9cf17fa404147f6b7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 52e94ef20f0a2821b4218b5412aa3448ec612a3a Author: Jan Kratochvil Date: Thu Jul 30 20:49:10 2015 +0200 buildidwarn commit 2d7f93fff19c806dd0567c58f06ee8c95014ac91 Author: Jan Kratochvil Date: Thu Jul 30 20:48:50 2015 +0200 locatetest commit a17cefb1a3689e04e1cf06f075f1e38bcbb98cae Author: Jan Kratochvil Date: Thu Jul 30 20:48:14 2015 +0200 mainbuildid commit ff2f924406cc046c67a53c401f903c2fe399dbfb Author: Jan Kratochvil Date: Thu Jul 30 20:31:46 2015 +0200 hexallocate commit 4b23b94c23cef3b156928540ff935dc880814907 Author: Jan Kratochvil Date: Tue Jul 28 22:13:31 2015 +0200 buildid commit d6f35619ecaf9c7b3e2f0ed9f430a8832ff4a866 Author: Jan Kratochvil Date: Tue Jul 28 22:12:52 2015 +0200 buildidproto commit ac9889e2f97ca0b02c8864e6bf0fec61564d009f Author: Jan Kratochvil Date: Wed Jul 29 21:38:45 2015 +0200 buildidtobfd commit ba9310665b459c0d53cb25f12ebbc0b751b7546a Author: Jan Kratochvil Date: Wed Jul 29 19:52:47 2015 +0200 buildidforcemove commit 4eb86256c28b998687a8743c06ad7d111cf1f936 Author: Jan Kratochvil Date: Thu Jul 30 23:07:10 2015 +0200 buildidfreefix commit e3a6fc81d5e6caff5d58562d178628e8a575d684 Author: Jan Kratochvil Date: Sat Jul 25 23:11:36 2015 +0200 openp commit 28202d6392adab7179a849c7b569c24427f09476 Author: Jan Kratochvil Date: Wed Jul 29 22:49:17 2015 +0200 filelib ----------------------------------------------------------------------- Summary of changes: gdb/build-id.c | 6 +++--- gdb/solib.c | 8 ++++---- gdb/source.c | 23 +++++++++++++++-------- gdb/source.h | 2 +- 4 files changed, 23 insertions(+), 16 deletions(-) First 500 lines of diff: diff --git a/gdb/build-id.c b/gdb/build-id.c index 95ddcc6..037d710 100644 --- a/gdb/build-id.c +++ b/gdb/build-id.c @@ -91,13 +91,13 @@ build_id_verify (bfd *abfd, size_t check_len, const bfd_byte *check) if (validate_build_id) { warning (_("Symbol file \"%s\" could not be validated (%s) and " - "will be ignored; or use 'set build-id-force'."), + "will be ignored; or use 'set validate-build-id off'."), bfd_get_filename (abfd), message); do_cleanups (back_to); return 0; } warning (_("Symbol file \"%s\" could not be validated (%s) " - "but it is being loaded due to 'set build-id-force'."), + "but it is being loaded due to 'set validate-build-id off'."), bfd_get_filename (abfd), message); do_cleanups (back_to); return 1; @@ -157,7 +157,7 @@ build_id_to_file (size_t build_id_len, const bfd_byte *build_id, file_location_free (&result); } - file_location_init (&result); + file_location_enoent (&result); return result; } diff --git a/gdb/solib.c b/gdb/solib.c index d9c5718..3128558 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -267,7 +267,7 @@ solib_find_3 (char *in_pathname, int is_bfd, int is_solib, const char *sysroot_o and retrying in the sysroot: c:/foo/bar.dll ==> /sysroot/c/foo/bar.dll. */ - if (strcmp (sysroot, "") != 0 + if (sysroot != NULL && HAS_TARGET_DRIVE_SPEC (fskind, in_pathname)) { int need_dir_separator = !IS_DIR_SEPARATOR (in_pathname[2]); @@ -374,7 +374,7 @@ solib_find_3 (char *in_pathname, int is_bfd, int is_solib, const char *sysroot_o } /* If not found, next search the inferior's $PATH environment variable. */ - if (strcmp (sysroot, "") == 0) + 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); if (file_location_is_valid (&file)) @@ -384,7 +384,7 @@ solib_find_3 (char *in_pathname, int is_bfd, int is_solib, const char *sysroot_o /* If not found, and we're looking for a solib, next search the inferior's $LD_LIBRARY_PATH environment variable. */ - if (is_solib && strcmp (sysroot, "") == 0) + 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); if (file_location_is_valid (&file)) @@ -392,7 +392,7 @@ solib_find_3 (char *in_pathname, int is_bfd, int is_solib, const char *sysroot_o file_location_free (&file); } - file_location_init (&file); + file_location_enoent (&file); return file; } diff --git a/gdb/source.c b/gdb/source.c index 6fdf571..bc327b0 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -738,10 +738,11 @@ dirnames_to_char_ptr_vec_target_exc (const char *string) } void -file_location_init (struct file_location *file) +file_location_enoent (struct file_location *file) { memset (file, 0, sizeof (*file)); file->fd = -1; + file->file_errno = ENOENT; } void @@ -771,7 +772,13 @@ file_location_cleanup (void *file_voidp) int file_location_is_valid (const struct file_location *file) { - return file->abfd != NULL || file->filename != NULL; + if (file->abfd != NULL) + { + gdb_assert (!file->file_errno); + gdb_assert (!file->bfderr); + return 1; + } + return !file->file_errno && !file->bfderr; } struct file_location @@ -782,7 +789,8 @@ file_location_from_filename (const char *filename, int is_bfd, size_t build_idsz int fd_dup = -1; struct cleanup *back_to, *fd_dup_cleanup; - file_location_init (&file); + memset (&file, 0, sizeof (file)); + file.fd = -1; back_to = make_cleanup (file_location_cleanup, &file); file.filename = xstrdup (filename); @@ -887,7 +895,7 @@ file_location_from_filename (const char *filename, int is_bfd, size_t build_idsz if (!build_id_verify (file.abfd, build_idsz, build_id)) { do_cleanups (back_to); - file_location_init (&file); + file_location_enoent (&file); return file; } @@ -1012,8 +1020,7 @@ openp_file (const char *path, enum openp_flags opts, const char *string, size_t when the debugger is started with an empty argument. */ if (string[0] == '\0') { - errno = ENOENT; - file_location_init (&file); + file_location_enoent (&file); return file; } @@ -1038,7 +1045,7 @@ openp_file (const char *path, enum openp_flags opts, const char *string, size_t for (i = 0; string[i]; i++) if (IS_DIR_SEPARATOR (string[i])) { - file_location_init (&file); + file_location_enoent (&file); return file; } } @@ -1137,7 +1144,7 @@ openp_file (const char *path, enum openp_flags opts, const char *string, size_t do_cleanups (back_to); - file_location_init (&file); + file_location_enoent (&file); return file; } diff --git a/gdb/source.h b/gdb/source.h index 14bb25d..7571cef 100644 --- a/gdb/source.h +++ b/gdb/source.h @@ -110,7 +110,7 @@ struct file_location bfd_error_type bfderr; }; -extern void file_location_init (struct file_location *file); +extern void file_location_enoent (struct file_location *file); extern void file_location_free (struct file_location *file); hooks/post-receive -- Repository for Project Archer.