Bug 6515 - fhpd command line args incorrect
Summary: fhpd command line args incorrect
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P1 critical
Target Milestone: ---
Assignee: Rick Moseley
URL:
Keywords:
: 6536 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-05-13 16:25 UTC by Martin Hunt
Modified: 2008-05-29 19:44 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Hunt 2008-05-13 16:25:50 UTC
man page says
fhpd [options] {program arg ...  | pid... | core-file [ core-executable ]... }

> cat args.c
#include<stdio.h>

int main(int argc, char *argv[])
{
  int i;
  
  for (i=0; i < argc; i++)
    printf("argv[%d] = %s\n", i, argv[i]);
}

> gcc -g -o args args.c

> ./args 20 30 40
argv[0] = ./args
argv[1] = 20
argv[2] = 30
argv[3] = 40

> fhpd ./args 20 30 40
[0.0] Loaded executable file: /home/hunt/test/args
(fhpd) run
running with this commmand:  /home/hunt/test/args
Attached to process 8757
Running process 8757
(fhpd) argv[0] = /home/hunt/test/args
argv[1] = /home/hunt/test/args
Task 8757 is exiting with status 2

(fhpd) quit
Comment 1 Rick Moseley 2008-05-14 18:51:39 UTC
It turns out this is an enhancement request.  We added the capability to pass
args a while back using the start/run commands.  The way you can do this now is:

$ ./fhpd ./args
(fhpd) start 20 30 40
starting with this command: path-to-args/args 20 30 40
Attached to process ?????
(fhpd)

Note that "start" in the above example could be replaced with "run".

This is a good idea though and looks to be pretty intuitive.  I'll see if I can
add it.

Thanks Martin.
Comment 2 Rick Moseley 2008-05-29 19:38:01 UTC
Fixed in frysk git HEAD.
Comment 3 Rick Moseley 2008-05-29 19:44:59 UTC
*** Bug 6536 has been marked as a duplicate of this bug. ***