* Question about args.exp test
@ 2004-04-21 18:33 Corinna Vinschen
2004-04-21 19:19 ` Daniel Jacobowitz
0 siblings, 1 reply; 7+ messages in thread
From: Corinna Vinschen @ 2004-04-21 18:33 UTC (permalink / raw)
To: gdb
Hi,
that's perhaps a dumb question but I don't understand what gdb.base/args.exp
is testing in case of the 2nd and 3rd test.
Both tests are, according to the comment, testing to give empty arguments
to the inferior. The args application just prints argc and the whole
argv vector unchanged to stdout.
Well, that's ok, but I don't understand this:
args.exp does not test the empty arguments being empty, but instead it
tests if '', two apostrophes, are printed. But that's not what the
args application prints. It just prints the empty string and a \n.
I'm just looking for arm and the arm simulator returns actually empty
lines where the empty arguments are printed. That looks correct to me,
but the tests fail, due to the missing ''.
Why is args.exp expecting two apostrophes and who's supposed to add them?
The args testapplication apparently isn't.
Corinna
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Question about args.exp test
2004-04-21 18:33 Question about args.exp test Corinna Vinschen
@ 2004-04-21 19:19 ` Daniel Jacobowitz
2004-04-22 8:07 ` Corinna Vinschen
0 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2004-04-21 19:19 UTC (permalink / raw)
To: gdb
On Wed, Apr 21, 2004 at 06:40:40PM +0200, Corinna Vinschen wrote:
> Hi,
>
> that's perhaps a dumb question but I don't understand what gdb.base/args.exp
> is testing in case of the 2nd and 3rd test.
>
> Both tests are, according to the comment, testing to give empty arguments
> to the inferior. The args application just prints argc and the whole
> argv vector unchanged to stdout.
>
> Well, that's ok, but I don't understand this:
>
> args.exp does not test the empty arguments being empty, but instead it
> tests if '', two apostrophes, are printed. But that's not what the
> args application prints. It just prints the empty string and a \n.
>
> I'm just looking for arm and the arm simulator returns actually empty
> lines where the empty arguments are printed. That looks correct to me,
> but the tests fail, due to the missing ''.
>
> Why is args.exp expecting two apostrophes and who's supposed to add them?
> The args testapplication apparently isn't.
IIRC, the comments are wrong. The tests can not be fixed for the ARM
simulator, though - I spent several days trying. Trace the path that
argv takes through from the GDB prompt to the inferior main(), if you
want some gruesome entertainment:
- it is word split by GDB before invoking the sim
- it is reconstructed into a string by the sim/RDI interface
- it is word split again in either newlib or libgloss, in handwritten
assembly
The interface simply does not permit properly quoted arguments.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Question about args.exp test
2004-04-21 19:19 ` Daniel Jacobowitz
@ 2004-04-22 8:07 ` Corinna Vinschen
2004-04-22 14:20 ` Daniel Jacobowitz
0 siblings, 1 reply; 7+ messages in thread
From: Corinna Vinschen @ 2004-04-22 8:07 UTC (permalink / raw)
To: gdb
On Apr 21 14:44, Daniel Jacobowitz wrote:
> On Wed, Apr 21, 2004 at 06:40:40PM +0200, Corinna Vinschen wrote:
> > Why is args.exp expecting two apostrophes and who's supposed to add them?
> > The args testapplication apparently isn't.
>
> IIRC, the comments are wrong. The tests can not be fixed for the ARM
> simulator, though - I spent several days trying. Trace the path that
> argv takes through from the GDB prompt to the inferior main(), if you
> want some gruesome entertainment:
> - it is word split by GDB before invoking the sim
> - it is reconstructed into a string by the sim/RDI interface
> - it is word split again in either newlib or libgloss, in handwritten
> assembly
>
> The interface simply does not permit properly quoted arguments.
Uh, that explains it.
Thanks for the description,
Corinna
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Question about args.exp test
2004-04-22 8:07 ` Corinna Vinschen
@ 2004-04-22 14:20 ` Daniel Jacobowitz
2004-04-22 14:27 ` Andrew Cagney
0 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2004-04-22 14:20 UTC (permalink / raw)
To: gdb
On Thu, Apr 22, 2004 at 09:33:34AM +0200, Corinna Vinschen wrote:
> On Apr 21 14:44, Daniel Jacobowitz wrote:
> > On Wed, Apr 21, 2004 at 06:40:40PM +0200, Corinna Vinschen wrote:
> > > Why is args.exp expecting two apostrophes and who's supposed to add them?
> > > The args testapplication apparently isn't.
> >
> > IIRC, the comments are wrong. The tests can not be fixed for the ARM
> > simulator, though - I spent several days trying. Trace the path that
> > argv takes through from the GDB prompt to the inferior main(), if you
> > want some gruesome entertainment:
> > - it is word split by GDB before invoking the sim
> > - it is reconstructed into a string by the sim/RDI interface
> > - it is word split again in either newlib or libgloss, in handwritten
> > assembly
> >
> > The interface simply does not permit properly quoted arguments.
>
> Uh, that explains it.
>
> Thanks for the description,
Should probably be xfail'd for arm-elf. I never did because,
conceptually, someone could be testing arm-elf with a different target
than the simulator and a differently protocol than RDI and a different
library than newlib - but in practice I doubt anyone does, so if you
want to stick a comment and some xfails in...
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Question about args.exp test
2004-04-22 14:20 ` Daniel Jacobowitz
@ 2004-04-22 14:27 ` Andrew Cagney
2004-04-22 14:30 ` Daniel Jacobowitz
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Cagney @ 2004-04-22 14:27 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb, Corinna Vinschen
> On Thu, Apr 22, 2004 at 09:33:34AM +0200, Corinna Vinschen wrote:
>
>>> On Apr 21 14:44, Daniel Jacobowitz wrote:
>>
>>>> > On Wed, Apr 21, 2004 at 06:40:40PM +0200, Corinna Vinschen wrote:
>>>
>>>>> > > Why is args.exp expecting two apostrophes and who's supposed to add them?
>>>>> > > The args testapplication apparently isn't.
>>>
>>>> >
>>>> > IIRC, the comments are wrong. The tests can not be fixed for the ARM
>>>> > simulator, though - I spent several days trying. Trace the path that
>>>> > argv takes through from the GDB prompt to the inferior main(), if you
>>>> > want some gruesome entertainment:
>>>> > - it is word split by GDB before invoking the sim
>>>> > - it is reconstructed into a string by the sim/RDI interface
>>>> > - it is word split again in either newlib or libgloss, in handwritten
>>>> > assembly
>>>> >
>>>> > The interface simply does not permit properly quoted arguments.
>>
>>>
>>> Uh, that explains it.
>>>
>>> Thanks for the description,
>
>
> Should probably be xfail'd for arm-elf. I never did because,
> conceptually, someone could be testing arm-elf with a different target
> than the simulator and a differently protocol than RDI and a different
> library than newlib - but in practice I doubt anyone does, so if you
> want to stick a comment and some xfails in...
It's a bug. There's nothing stopping someone fixing the sim target.
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Question about args.exp test
2004-04-22 14:27 ` Andrew Cagney
@ 2004-04-22 14:30 ` Daniel Jacobowitz
2004-04-22 15:19 ` Andrew Cagney
0 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2004-04-22 14:30 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb, Corinna Vinschen
On Thu, Apr 22, 2004 at 10:20:42AM -0400, Andrew Cagney wrote:
> >On Thu, Apr 22, 2004 at 09:33:34AM +0200, Corinna Vinschen wrote:
> >
> >>>On Apr 21 14:44, Daniel Jacobowitz wrote:
> >>
> >>>>> On Wed, Apr 21, 2004 at 06:40:40PM +0200, Corinna Vinschen wrote:
> >>>
> >>>>>> > Why is args.exp expecting two apostrophes and who's supposed to
> >>>>>add them?
> >>>>>> > The args testapplication apparently isn't.
> >>>
> >>>>>
> >>>>> IIRC, the comments are wrong. The tests can not be fixed for the ARM
> >>>>> simulator, though - I spent several days trying. Trace the path that
> >>>>> argv takes through from the GDB prompt to the inferior main(), if you
> >>>>> want some gruesome entertainment:
> >>>>> - it is word split by GDB before invoking the sim
> >>>>> - it is reconstructed into a string by the sim/RDI interface
> >>>>> - it is word split again in either newlib or libgloss, in
> >>>>handwritten
> >>>>> assembly
> >>>>>
> >>>>> The interface simply does not permit properly quoted arguments.
> >>
> >>>
> >>>Uh, that explains it.
> >>>
> >>>Thanks for the description,
> >
> >
> >Should probably be xfail'd for arm-elf. I never did because,
> >conceptually, someone could be testing arm-elf with a different target
> >than the simulator and a differently protocol than RDI and a different
> >library than newlib - but in practice I doubt anyone does, so if you
> >want to stick a comment and some xfails in...
>
> It's a bug. There's nothing stopping someone fixing the sim target.
Did you read my reply at all? The sim complies with the RDI mechanism
of passing information and syscalls to inferior programs. The
mechanism is incapable of handling quoted arguments. I don't think it
can be fixed.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Question about args.exp test
2004-04-22 14:30 ` Daniel Jacobowitz
@ 2004-04-22 15:19 ` Andrew Cagney
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Cagney @ 2004-04-22 15:19 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb, Corinna Vinschen
>>>Should probably be xfail'd for arm-elf. I never did because,
>>>> >conceptually, someone could be testing arm-elf with a different target
>>>> >than the simulator and a differently protocol than RDI and a different
>>>> >library than newlib - but in practice I doubt anyone does, so if you
>>>> >want to stick a comment and some xfails in...
>>
>>>
>>> It's a bug. There's nothing stopping someone fixing the sim target.
>
>
> Did you read my reply at all? The sim complies with the RDI mechanism
> of passing information and syscalls to inferior programs. The
> mechanism is incapable of handling quoted arguments. I don't think it
> can be fixed.
I didn't say it was easy. All simulators should consistently handle
parameters in their _default_ mode. At present they don't, and thats a
bug. If a simulator gets set to `rdi' mode then it probably won't work.
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-04-22 14:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-21 18:33 Question about args.exp test Corinna Vinschen
2004-04-21 19:19 ` Daniel Jacobowitz
2004-04-22 8:07 ` Corinna Vinschen
2004-04-22 14:20 ` Daniel Jacobowitz
2004-04-22 14:27 ` Andrew Cagney
2004-04-22 14:30 ` Daniel Jacobowitz
2004-04-22 15:19 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox