This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] obvious (I think) correction to compiler.c and compiler.cc
- From: Paul Gilliam <pgilliam at us dot ibm dot com>
- To: gdb-patches at sources dot redhat dot com
- Cc: Daniel Jacobowitz <drow at false dot org>
- Date: Mon, 7 Mar 2005 10:39:16 -0800
- Subject: [PATCH] obvious (I think) correction to compiler.c and compiler.cc
- Reply-to: pgilliam at us dot ibm dot com
This fixes a problem with this committed patch:
http://sources.redhat.com/ml/gdb-patches/2005-03/msg00050.htm
'compiler.c' and 'compiler.cc' where doing the right thing, but
get_compiler_info was not evaluating the key line because it did not begin
with 'set'. Rather then add another case to get_compiler_info, I changed
the the line in compiler.c and compiler.cc to be 'set need_a_set
[regsub....]'
At first I thought this was obvious, but because it could be fixed in
compiler.c and compiler.cc or fixed in get_compiler_info, I thought maybe it
wasn't so obvious. I fixed it here in compiler.c and compiler.cc because
those are compiler dependent and get_compiler_info is more generic.
OK to commit?
-=# Paul #=-
RCS file: /cvs/src/src/gdb/testsuite/lib/compiler.c,v
retrieving revision 1.9
diff -c -3 -p -r1.9 compiler.c
*** compiler.c 4 Mar 2005 17:35:46 -0000 1.9
--- compiler.c 7 Mar 2005 18:20:38 -0000
*************** set compiler_info [join {hpacc __HP_aCC}
*** 68,72 ****
#if defined (__xlc__)
/* IBM'x xlc compiler. NOTE: __xlc__ expands to a double quoted string of
four
numbers seperated by '.'s: currently "7.0.0.0" */
! regsub -all {\.} [join {xlc __xlc__} -] - compiler_info
#endif
--- 68,72 ----
#if defined (__xlc__)
/* IBM'x xlc compiler. NOTE: __xlc__ expands to a double quoted string of
four
numbers seperated by '.'s: currently "7.0.0.0" */
! set need_a_set [regsub -all {\.} [join {xlc __xlc__} -] - compiler_info]
#endif
Index: compiler.cc
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/compiler.cc,v
retrieving revision 1.11
diff -c -3 -p -r1.11 compiler.cc
*** compiler.cc 4 Mar 2005 17:35:46 -0000 1.11
--- compiler.cc 7 Mar 2005 18:20:39 -0000
*************** set compiler_info [join {hpacc __HP_aCC}
*** 56,60 ****
#if defined (__xlc__)
/* IBM'x xlc compiler. NOTE: __xlc__ expands to a double quoted string of
four
numbers seperated by '.'s: currently "7.0.0.0" */
! regsub -all {\.} [join {xlc __xlc__} -] - compiler_info
#endif
--- 56,60 ----
#if defined (__xlc__)
/* IBM'x xlc compiler. NOTE: __xlc__ expands to a double quoted string of
four
numbers seperated by '.'s: currently "7.0.0.0" */
! set need_a_set [regsub -all {\.} [join {xlc __xlc__} -] - compiler_info]
#endif