Merge branch 'gdb-9-branch' into amd-staging-rocgdb-9
authorLaurent Morichetti <laurent.morichetti@amd.com>
Mon, 10 Feb 2020 22:56:03 +0000 (14:56 -0800)
committerLaurent Morichetti <laurent.morichetti@amd.com>
Mon, 10 Feb 2020 22:56:03 +0000 (14:56 -0800)
Change-Id: I87c1d275efe8128a2615286a6192e3e7163545a4

16 files changed:
bfd/version.h
gdb/ChangeLog
gdb/event-loop.c
gdb/event-top.c
gdb/printcmd.c
gdb/remote-fileio.c
gdb/remote-sim.c
gdb/remote.c
gdb/source.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/annotate-symlink.exp
gdb/ui-file.c
gdb/ui-file.h
gdb/utils.c
gdb/utils.h
gdb/version.in

index c10d709b9510fa31599c834ec24225b44b7af2a0..7ab5ae8c4b25d01111107bb7e4d9df8dd2b1d088 100644 (file)
@@ -16,7 +16,7 @@
 
    In releases, the date is not included in either version strings or
    sonames.  */
-#define BFD_VERSION_DATE 20200206
+#define BFD_VERSION_DATE 20200208
 #define BFD_VERSION @bfd_version@
 #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
 #define REPORT_BUGS_TO @report_bugs_to@
index dc326f72e9cc5507e218a24cebc8277c8d8509fe..f55f4a2286ef3b0cf2309740c7e8d3133a5aa176 100644 (file)
@@ -1,3 +1,42 @@
+2020-02-08  Joel Brobecker  <brobecker@adacore.com>
+
+       * version.in: Set GDB version number to 9.1.
+
+2020-02-05  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+       PR gdb/25190:
+        * gdb/remote-sim.c (gdb_os_write_stderr): Update.
+        * gdb/remote.c (remote_console_output): Update.
+        * gdb/ui-file.c (fputs_unfiltered): Rename to...
+        (ui_file_puts): ...this.
+        * gdb/ui-file.h (ui_file_puts): Add declaration.
+        * gdb/utils.c (emit_style_escape): Update.
+        (flush_wrap_buffer): Update.
+        (fputs_maybe_filtered): Update.
+        (fputs_unfiltered): Add function.
+
+2020-02-05  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+        * gdb/event-loop.c (gdb_wait_for_event): Update.
+        * gdb/printcmd.c (printf_command): Update.
+        * gdb/remote-fileio.c (remote_fileio_func_write): Update.
+        * gdb/remote-sim.c (gdb_os_flush_stdout): Update.
+        (gdb_os_flush_stderr): Update.
+        * gdb/remote.c (remote_console_output): Update.
+        * gdb/ui-file.c (gdb_flush): Rename to...
+        (ui_file_flush): ...this.
+        (stderr_file::write): Update.
+        (stderr_file::puts): Update.
+        * gdb/ui-file.h (gdb_flush): Rename to...
+        (ui_file_flush): ...this.
+        * gdb/utils.c (gdb_flush): Add function.
+        * gdb/utils.h (gdb_flush): Add declaration.
+
+2020-02-07  Tom Tromey  <tromey@adacore.com>
+
+       PR breakpoints/24915:
+       * source.c (find_and_open_source): Do not check basenames_may_differ.
+
 2020-01-10  Christian Biesinger  <cbiesinger@google.com>
 
        * gdbsupport/common-defs.h: Don't define _FORTIFY_SOURCE on MinGW.
index 32f4ccaae741edd9926bad461c319f3d7f87a042..5be050df39357e442008313e1c9463779254e0c6 100644 (file)
@@ -747,8 +747,8 @@ gdb_wait_for_event (int block)
   int num_found = 0;
 
   /* Make sure all output is done before getting another event.  */
-  gdb_flush (gdb_stdout);
-  gdb_flush (gdb_stderr);
+  ui_file_flush (gdb_stdout);
+  ui_file_flush (gdb_stderr);
 
   if (gdb_notifier.num_fds == 0)
     return -1;
index 9f219f60ba12215780c99ef5c3366880f978dccf..8ac6965f38874e209830ca53be5a38edf2647037 100644 (file)
@@ -416,7 +416,7 @@ display_gdb_prompt (const char *new_prompt)
       /* Don't use a _filtered function here.  It causes the assumed
          character position to be off, since the newline we read from
          the user is not accounted for.  */
-      fputs_unfiltered (actual_gdb_prompt.c_str (), gdb_stdout);
+      fprintf_unfiltered (gdb_stdout, "%s", actual_gdb_prompt.c_str ());
       gdb_flush (gdb_stdout);
     }
 }
index 95739cd77d2ab63bcd6181e72731befeb05c03a2..ed2c8d47add3ff980c403625cbdf4a86f47fc43e 100644 (file)
@@ -2720,7 +2720,7 @@ printf_command (const char *arg, int from_tty)
   ui_printf (arg, gdb_stdout);
   reset_terminal_style (gdb_stdout);
   wrap_here ("");
-  gdb_flush (gdb_stdout);
+  ui_file_flush (gdb_stdout);
 }
 
 /* Implement the "eval" command.  */
index e75068390a10c6aa63094bc8ec08423a42657afc..40add06509ed56e37a8701447b2182f749dc2093 100644 (file)
@@ -641,7 +641,7 @@ remote_fileio_func_write (remote_target *remote, char *buf)
       case FIO_FD_CONSOLE_OUT:
        ui_file_write (target_fd == 1 ? gdb_stdtarg : gdb_stdtargerr,
                       (char *) buffer, length);
-       gdb_flush (target_fd == 1 ? gdb_stdtarg : gdb_stdtargerr);
+       ui_file_flush (target_fd == 1 ? gdb_stdtarg : gdb_stdtargerr);
        ret = length;
        break;
       default:
index 582d206d60c7a13c285a98ee1fd5a56a3390e3db..2965789a273e7f1d8d78d07961012f165343bfdc 100644 (file)
@@ -361,7 +361,7 @@ gdb_os_write_stdout (host_callback *p, const char *buf, int len)
 static void
 gdb_os_flush_stdout (host_callback *p)
 {
-  gdb_flush (gdb_stdtarg);
+  ui_file_flush (gdb_stdtarg);
 }
 
 /* GDB version of os_write_stderr callback.  */
@@ -376,7 +376,7 @@ gdb_os_write_stderr (host_callback *p, const char *buf, int len)
     {
       b[0] = buf[i];
       b[1] = 0;
-      fputs_unfiltered (b, gdb_stdtargerr);
+      ui_file_puts (gdb_stdtargerr, b);
     }
   return len;
 }
@@ -386,7 +386,7 @@ gdb_os_write_stderr (host_callback *p, const char *buf, int len)
 static void
 gdb_os_flush_stderr (host_callback *p)
 {
-  gdb_flush (gdb_stdtargerr);
+  ui_file_flush (gdb_stdtargerr);
 }
 
 /* GDB version of printf_filtered callback.  */
index 73213806b5a561bd0ccda242d0b962743266b19f..4df5c0aef8ea40bf2b84a4683e6d132243e154f8 100644 (file)
@@ -6782,9 +6782,9 @@ remote_console_output (const char *msg)
 
       tb[0] = c;
       tb[1] = 0;
-      fputs_unfiltered (tb, gdb_stdtarg);
+      ui_file_puts (gdb_stdtarg, tb);
     }
-  gdb_flush (gdb_stdtarg);
+  ui_file_flush (gdb_stdtarg);
 }
 
 struct stop_reply : public notif_event
index 2497e7f750efbbb477771cf04a6e979f6b234618..a737c95e7a44762988a5c63ce69fa276f2940e54 100644 (file)
@@ -1025,10 +1025,7 @@ find_and_open_source (const char *filename,
       result = gdb_open_cloexec (fullname->get (), OPEN_MODE, 0);
       if (result >= 0)
        {
-         if (basenames_may_differ)
-           *fullname = gdb_realpath (fullname->get ());
-         else
-           *fullname = gdb_abspath (fullname->get ());
+         *fullname = gdb_realpath (fullname->get ());
          return scoped_fd (result);
        }
 
@@ -1072,12 +1069,9 @@ find_and_open_source (const char *filename,
   if (rewritten_filename != NULL)
     filename = rewritten_filename.get ();
 
-  openp_flags flags = OPF_SEARCH_IN_PATH;
-  if (basenames_may_differ)
-    flags |= OPF_RETURN_REALPATH;
-
   /* Try to locate file using filename.  */
-  result = openp (path, flags, filename, OPEN_MODE, fullname);
+  result = openp (path, OPF_SEARCH_IN_PATH | OPF_RETURN_REALPATH, filename,
+                 OPEN_MODE, fullname);
   if (result < 0 && dirname != NULL)
     {
       /* Remove characters from the start of PATH that we don't need when
@@ -1098,15 +1092,16 @@ find_and_open_source (const char *filename,
       cdir_filename.append (SLASH_STRING);
       cdir_filename.append (filename_start);
 
-      result = openp (path, flags, cdir_filename.c_str (), OPEN_MODE,
-                     fullname);
+      result = openp (path, OPF_SEARCH_IN_PATH | OPF_RETURN_REALPATH,
+                     cdir_filename.c_str (), OPEN_MODE, fullname);
     }
   if (result < 0)
     {
       /* Didn't work.  Try using just the basename.  */
       p = lbasename (filename);
       if (p != filename)
-       result = openp (path, flags, p, OPEN_MODE, fullname);
+       result = openp (path, OPF_SEARCH_IN_PATH | OPF_RETURN_REALPATH, p,
+                       OPEN_MODE, fullname);
     }
 
   return scoped_fd (result);
index 02a74b93c3f66344a4fdb99c7f5eb0d3ae090b2e..ec507fd1b2151b912727e3d1d3a8f17e00133eb0 100644 (file)
@@ -1,3 +1,8 @@
+2020-02-07  Tom Tromey  <tromey@adacore.com>
+
+       PR breakpoints/24915:
+       * gdb.base/annotate-symlink.exp: Use setup_xfail.
+
 2020-01-06  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * gdb.base/backtrace.c: New file.
index d22593ca364fefedd9b8f941d8560b48dca7a692..830949daa422e00c3234add1f7e7c59543c9061c 100644 (file)
@@ -47,5 +47,8 @@ gdb_breakpoint func message
 
 gdb_test_no_output "set annotate 1"
 
+# The patch to cause this output was reverted.
+# See PR breakpoints/24915.
+setup_xfail *-*-* 24915
 gdb_test "continue" \
     "Breakpoint .* func .*realname-expand-link.c:$decimal\r\n\032\032.*realname-expand-link.c:.*"
index e2ff28edac7672432cb1c66ffedd4a954feeaf86..abc69c76976250ec4cb37f701b9c65ad8088daf9 100644 (file)
@@ -92,7 +92,7 @@ null_file::write_async_safe (const char *buf, long sizeof_buf)
 \f
 
 void
-gdb_flush (struct ui_file *file)
+ui_file_flush (struct ui_file *file)
 {
   file->flush ();
 }
@@ -151,7 +151,7 @@ ui_file_read (struct ui_file *file, char *buf, long length_buf)
 }
 
 void
-fputs_unfiltered (const char *buf, struct ui_file *file)
+ui_file_puts (struct ui_file *file, const char *buf)
 {
   file->puts (buf);
 }
@@ -316,7 +316,7 @@ stdio_file::can_emit_style_escape ()
 void
 stderr_file::write (const char *buf, long length_buf)
 {
-  gdb_flush (gdb_stdout);
+  ui_file_flush (gdb_stdout);
   stdio_file::write (buf, length_buf);
 }
 
@@ -326,7 +326,7 @@ stderr_file::write (const char *buf, long length_buf)
 void
 stderr_file::puts (const char *linebuffer)
 {
-  gdb_flush (gdb_stdout);
+  ui_file_flush (gdb_stdout);
   stdio_file::puts (linebuffer);
 }
 
index 1df477d5b84a8e88a8bc50e26775c7cc1950de20..67685bdfa158b3bdddfda4db0e82920e052d7eae 100644 (file)
@@ -100,7 +100,7 @@ public:
 /* A preallocated null_file stream.  */
 extern null_file null_stream;
 
-extern void gdb_flush (ui_file *);
+extern void ui_file_flush (ui_file *);
 
 extern int ui_file_isatty (struct ui_file *);
 
@@ -112,6 +112,8 @@ extern void ui_file_write_async_safe (struct ui_file *file, const char *buf,
 
 extern long ui_file_read (struct ui_file *file, char *buf, long length_buf);
 
+extern void ui_file_puts (struct ui_file *file, const char *buf);
+
 extern int gdb_console_fputs (const char *, FILE *);
 
 /* A std::string-based ui_file.  Can be used as a scratch buffer for
index d58c8742baeefd8c7cd15e219557c098bc26608f..fb20c45507103c9a94d4300c98277031552e8aa6 100644 (file)
@@ -1405,7 +1405,7 @@ emit_style_escape (const ui_file_style &style,
   if (stream == nullptr)
     wrap_buffer.append (style.to_ansi ());
   else
-    fputs_unfiltered (style.to_ansi ().c_str (), stream);
+    ui_file_puts (stream, style.to_ansi ().c_str ());
 }
 
 /* Set the current output style.  This will affect future uses of the
@@ -1539,11 +1539,20 @@ flush_wrap_buffer (struct ui_file *stream)
 {
   if (stream == gdb_stdout && !wrap_buffer.empty ())
     {
-      fputs_unfiltered (wrap_buffer.c_str (), stream);
+      ui_file_puts (stream, wrap_buffer.c_str ());
       wrap_buffer.clear ();
     }
 }
 
+/* See utils.h.  */
+
+void
+gdb_flush (struct ui_file *stream)
+{
+  flush_wrap_buffer (stream);
+  ui_file_flush (stream);
+}
+
 /* Indicate that if the next sequence of characters overflows the line,
    a newline should be inserted here rather than when it hits the end.
    If INDENT is non-null, it is a string to be printed to indent the
@@ -1688,7 +1697,7 @@ fputs_maybe_filtered (const char *linebuffer, struct ui_file *stream,
       || top_level_interpreter ()->interp_ui_out ()->is_mi_like_p ())
     {
       flush_wrap_buffer (stream);
-      fputs_unfiltered (linebuffer, stream);
+      ui_file_puts (stream, linebuffer);
       return;
     }
 
@@ -1788,7 +1797,7 @@ fputs_maybe_filtered (const char *linebuffer, struct ui_file *stream,
              /* Now output indentation and wrapped string.  */
              if (wrap_column)
                {
-                 fputs_unfiltered (wrap_indent, stream);
+                 ui_file_puts (stream, wrap_indent);
                  if (stream->can_emit_style_escape ())
                    emit_style_escape (save_style, stream);
                  /* FIXME, this strlen is what prevents wrap_indent from
@@ -1826,6 +1835,12 @@ fputs_filtered (const char *linebuffer, struct ui_file *stream)
   fputs_maybe_filtered (linebuffer, stream, 1);
 }
 
+void
+fputs_unfiltered (const char *linebuffer, struct ui_file *stream)
+{
+  fputs_maybe_filtered (linebuffer, stream, 0);
+}
+
 /* See utils.h.  */
 
 void
index 3f00a2f2386eabb448c79ea5bb0feb6d56019fa3..10877da56ee3e6ad19b03f8300978256589b7991 100644 (file)
@@ -323,6 +323,12 @@ extern struct ui_file **current_ui_gdb_stdin_ptr (void);
 extern struct ui_file **current_ui_gdb_stderr_ptr (void);
 extern struct ui_file **current_ui_gdb_stdlog_ptr (void);
 
+/* Flush STREAM.  This is a wrapper for ui_file_flush that also
+   flushes any output pending from uses of the *_filtered output
+   functions; that output is kept in a special buffer so that
+   pagination and styling are handled properly.  */
+extern void gdb_flush (struct ui_file *);
+
 /* The current top level's ui_file streams.  */
 
 /* Normal results */
index bf80c72138f0dce224c2e89f225bc9dd5dc7269c..28a2186428bce031c24134633c4ab80a86f11668 100644 (file)
@@ -1 +1 @@
-9.0.90.DATE-git
+9.1
This page took 0.040283 seconds and 4 git commands to generate.