Blame SOURCES/gdb-rhbz1186918-gdbserver-in-container-8of8.patch

01917d
commit fef3cb9f3aa84018d10866f89228ae3f23e5ca7e
01917d
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
01917d
Date:   Wed Apr 6 15:57:08 2016 +0200
01917d
01917d
    Print the "file" command suggestion in exec_file_locate_attach
01917d
    
01917d
    currently:
01917d
    	$ gdbserver-7.9 :1234 true &
01917d
    	$ gdb -q -ex 'target remote :1234' # that -q is not relevant here
01917d
    	Remote debugging using :1234
01917d
    	warning: Could not load vsyscall page because no executable was specified
01917d
    	try using the "file" command first.
01917d
    	0x00007ffff7ddcc80 in ?? ()
01917d
    	(gdb) b main
01917d
    	No symbol table is loaded.  Use the "file" command.
01917d
    	Make breakpoint pending on future shared library load? (y or [n]) _
01917d
    
01917d
    Provide more suggestive message to use the "file" command.
01917d
    
01917d
    gdb/ChangeLog
01917d
    2016-04-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
01917d
    	    Pedro Alves  <palves@redhat.com>
01917d
    
01917d
    	* exec.c (exec_file_locate_attach): Print warning for unsupported
01917d
    	target_pid_to_exec_file.
01917d
    	* symfile-mem.c (add_vsyscall_page): Remove the "file" command
01917d
    	message part.
01917d
01917d
### a/gdb/ChangeLog
01917d
### b/gdb/ChangeLog
01917d
## -1,3 +1,11 @@
01917d
+2016-04-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
01917d
+	    Pedro Alves  <palves@redhat.com>
01917d
+
01917d
+	* exec.c (exec_file_locate_attach): Print warning for unsupported
01917d
+	target_pid_to_exec_file.
01917d
+	* symfile-mem.c (add_vsyscall_page): Remove the "file" command
01917d
+	message part.
01917d
+
01917d
 2016-04-04  Simon Marchi  <simon.marchi@ericsson.com>
01917d
 
01917d
 	* cli/cli-decode.c (help_cmd_list): Fix function doc and remove
01917d
Index: gdb-7.6.1/gdb/symfile-mem.c
01917d
===================================================================
01917d
--- gdb-7.6.1.orig/gdb/symfile-mem.c	2016-04-27 23:28:29.490647020 +0200
01917d
+++ gdb-7.6.1/gdb/symfile-mem.c	2016-04-27 23:30:03.395264401 +0200
01917d
@@ -212,8 +212,7 @@
01917d
 	  format should fix this.  */
01917d
 	{
01917d
 	  warning (_("Could not load vsyscall page "
01917d
-		     "because no executable was specified\n"
01917d
-		     "try using the \"file\" command first."));
01917d
+		     "because no executable was specified"));
01917d
 	  return;
01917d
 	}
01917d
       args.bfd = bfd;
01917d
Index: gdb-7.6.1/gdb/infcmd.c
01917d
===================================================================
01917d
--- gdb-7.6.1.orig/gdb/infcmd.c	2013-03-07 22:57:29.000000000 +0100
01917d
+++ gdb-7.6.1/gdb/infcmd.c	2016-04-27 23:30:37.366487747 +0200
01917d
@@ -2426,7 +2426,12 @@
01917d
   if (!exec_file)
01917d
     {
01917d
       exec_file = target_pid_to_exec_file (PIDGET (inferior_ptid));
01917d
-      if (exec_file)
01917d
+      if (!exec_file)
01917d
+	warning (_("No executable has been specified and target does not "
01917d
+		   "support\n"
01917d
+		   "determining executable automatically.  "
01917d
+		   "Try using the \"file\" command."));
01917d
+      else
01917d
 	{
01917d
 	  /* It's possible we don't have a full path, but rather just a
01917d
 	     filename.  Some targets, such as HP-UX, don't provide the