Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] break-interp.exp: handle /usr/sbin/prelink.bin
@ 2010-03-18  6:15 Doug Evans
  2010-03-18  7:15 ` Mike Frysinger
  2010-03-18 13:59 ` Joel Brobecker
  0 siblings, 2 replies; 5+ messages in thread
From: Doug Evans @ 2010-03-18  6:15 UTC (permalink / raw)
  To: gdb-patches

Hi.

On one system I use /usr/sbin/prelink is a wrapper script around
/usr/sbin/prelink.bin.
This breaks break-interp.exp.

I will check in the following patch in a day if there are no objections.

2010-03-17  Doug Evans  <dje@google.com>

	* gdb.base/break-interp.exp (prelinkNO): Handle prelink binaries
	named /usr/sbin/prelink<foo>.

Index: testsuite/gdb.base/break-interp.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/break-interp.exp,v
retrieving revision 1.7
diff -u -p -r1.7 break-interp.exp
--- testsuite/gdb.base/break-interp.exp	11 Mar 2010 22:07:03 -0000	1.7
+++ testsuite/gdb.base/break-interp.exp	18 Mar 2010 06:11:38 -0000
@@ -141,7 +141,7 @@ proc prelinkNO {arg {name {}}} {
 	set output [lindex $run 1]
     }
     # Last line does miss the trailing \n.
-    if {$result == 1 && [regexp {^(/usr/sbin/prelink: [^ ]* does not have .gnu.prelink_undo section\n?)*$} $output]} {
+    if {$result == 1 && [regexp {^(/usr/sbin/prelink[^ ]*: [^ ]* does not have .gnu.prelink_undo section\n?)*$} $output]} {
 	pass $test
 	return 1
     } else {


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] break-interp.exp: handle /usr/sbin/prelink.bin
  2010-03-18  6:15 [patch] break-interp.exp: handle /usr/sbin/prelink.bin Doug Evans
@ 2010-03-18  7:15 ` Mike Frysinger
  2010-03-18  7:26   ` Doug Evans
  2010-03-18 13:59 ` Joel Brobecker
  1 sibling, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2010-03-18  7:15 UTC (permalink / raw)
  To: gdb-patches; +Cc: Doug Evans

[-- Attachment #1: Type: Text/Plain, Size: 447 bytes --]

On Thursday 18 March 2010 02:15:07 Doug Evans wrote:
> -    if {$result == 1 && [regexp {^(/usr/sbin/prelink: [^ ]* does not have
> .gnu.prelink_undo section\n?)*$} $output]} {
> +    if {$result == 1 && [regexp {^(/usr/sbin/prelink[^ ]*: [^ ]* does not
> have .gnu.prelink_undo section\n?)*$} $output]} {

since the prelink filename shouldnt have a colon in it, should that be used in 
the regex instead ?
/usr/sbin/prelink[^:]*:
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] break-interp.exp: handle /usr/sbin/prelink.bin
  2010-03-18  7:15 ` Mike Frysinger
@ 2010-03-18  7:26   ` Doug Evans
  2010-03-18  7:43     ` Mike Frysinger
  0 siblings, 1 reply; 5+ messages in thread
From: Doug Evans @ 2010-03-18  7:26 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: gdb-patches

On Thu, Mar 18, 2010 at 12:15 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Thursday 18 March 2010 02:15:07 Doug Evans wrote:
>> -    if {$result == 1 && [regexp {^(/usr/sbin/prelink: [^ ]* does not have
>> .gnu.prelink_undo section\n?)*$} $output]} {
>> +    if {$result == 1 && [regexp {^(/usr/sbin/prelink[^ ]*: [^ ]* does not
>> have .gnu.prelink_undo section\n?)*$} $output]} {
>
> since the prelink filename shouldnt have a colon in it, should that be used in
> the regex instead ?
> /usr/sbin/prelink[^:]*:
> -mike

Either is arguably wrong IMO.  Why can't the program have a colon or
space in its name?
But I don't have a strong opinion on which one to actually use, or
something else.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] break-interp.exp: handle /usr/sbin/prelink.bin
  2010-03-18  7:26   ` Doug Evans
@ 2010-03-18  7:43     ` Mike Frysinger
  0 siblings, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2010-03-18  7:43 UTC (permalink / raw)
  To: gdb-patches; +Cc: Doug Evans

[-- Attachment #1: Type: Text/Plain, Size: 1149 bytes --]

On Thursday 18 March 2010 03:26:20 Doug Evans wrote:
> On Thu, Mar 18, 2010 at 12:15 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> > On Thursday 18 March 2010 02:15:07 Doug Evans wrote:
> >> -    if {$result == 1 && [regexp {^(/usr/sbin/prelink: [^ ]* does not
> >> have .gnu.prelink_undo section\n?)*$} $output]} {
> >> +    if {$result == 1 && [regexp {^(/usr/sbin/prelink[^ ]*: [^ ]* does
> >> not have .gnu.prelink_undo section\n?)*$} $output]} {
> > 
> > since the prelink filename shouldnt have a colon in it, should that be
> > used in the regex instead ?
> > /usr/sbin/prelink[^:]*:
> 
> Either is arguably wrong IMO.  Why can't the program have a colon or
> space in its name?

i said "shouldnt", not "cant".  i was thinking from a practical standpoint -- 
spaces are much more common than colons in filenames, and colons are generally 
discouraged from paths because they break fundamental things like colon-
separated variables such as $PATH.

> But I don't have a strong opinion on which one to actually use, or
> something else.

just a suggestion; i dont particularly care as i dont deal with prelink.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] break-interp.exp: handle /usr/sbin/prelink.bin
  2010-03-18  6:15 [patch] break-interp.exp: handle /usr/sbin/prelink.bin Doug Evans
  2010-03-18  7:15 ` Mike Frysinger
@ 2010-03-18 13:59 ` Joel Brobecker
  1 sibling, 0 replies; 5+ messages in thread
From: Joel Brobecker @ 2010-03-18 13:59 UTC (permalink / raw)
  To: Doug Evans; +Cc: gdb-patches

> 2010-03-17  Doug Evans  <dje@google.com>
> 
> 	* gdb.base/break-interp.exp (prelinkNO): Handle prelink binaries
> 	named /usr/sbin/prelink<foo>.

No objection on my end. Regarding the space-vs-colon discussion, well,
we can deal with that when an issue actually arises...

-- 
Joel


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-18 13:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-18  6:15 [patch] break-interp.exp: handle /usr/sbin/prelink.bin Doug Evans
2010-03-18  7:15 ` Mike Frysinger
2010-03-18  7:26   ` Doug Evans
2010-03-18  7:43     ` Mike Frysinger
2010-03-18 13:59 ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox