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

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