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

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