This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb/2017: GDB fails to compile on GNU with GCC 4.x.


>Number:         2017
>Category:       gdb
>Synopsis:       GDB fails to compile on GNU with GCC 4.x.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          patch
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 01 17:08:00 UTC 2005
>Closed-Date:
>Last-Modified:
>Originator:     ams@gnu.org
>Release:        gdb-6.3
>Organization:
>Environment:
i*86-pc-gnu0.3
>Description:
The following small patch fixes so that GDB will compile
with GCC 4.x on the GNU system.

gdb/ChangeLog
2005-09-15  Alfred M. Szmidt  <ams@gnu.org>

	* gnu-nat.c (inf_validate_procs): Don't use lvalue in assignments.
>How-To-Repeat:
Compile GDB 5.3 with GCC 4.0.1 or later on the GNU system.q
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="foo.txt"
Content-Disposition: inline; filename="foo.txt"

gdb/ChangeLog
2005-09-15  Alfred M. Szmidt  <ams@gnu.org>

	* gnu-nat.c (inf_validate_procs): Don't use lvalue in assignments.

--- gdb/gnu-nat.c
+++ gdb/gnu-nat.c
@@ -1050,7 +1050,10 @@
 	    proc_debug (thread, "died!");
 	    thread->port = MACH_PORT_NULL;
 	    thread = _proc_free (thread);	/* THREAD is dead.  */
-	    (last ? last->next : inf->threads) = thread;
+	    if (last)
+	      last->next = thread;
+	    else
+	      inf->threads = thread;
 	  }
       }
 
@@ -1063,7 +1066,10 @@
 	  /* THREADS[I] is a thread we don't know about yet!  */
 	  {
 	    thread = make_proc (inf, threads[i], next_thread_id++);
-	    (last ? last->next : inf->threads) = thread;
+	    if (last)
+	      last->next = thread;
+	    else
+	      inf->threads = thread;
 	    last = thread;
 	    proc_debug (thread, "new thread: %d", threads[i]);
 	    add_thread (pid_to_ptid (thread->tid));	/* Tell GDB's generic thread code.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]