aboutsummaryrefslogtreecommitdiff
path: root/src/libmach
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-18 20:49:11 +0000
committerrsc <devnull@localhost>2005-01-18 20:49:11 +0000
commit1bdf1708647ffabfa2542a02fd14a0c855067d91 (patch)
treece1b9896efda63cc9518b36447652fc0c44e5f41 /src/libmach
parent58698c9c1205e44c77734e7a32338f6c08bc4aaa (diff)
downloadplan9port-1bdf1708647ffabfa2542a02fd14a0c855067d91.tar.gz
plan9port-1bdf1708647ffabfa2542a02fd14a0c855067d91.tar.bz2
plan9port-1bdf1708647ffabfa2542a02fd14a0c855067d91.zip
extract cmd in right place
Diffstat (limited to 'src/libmach')
-rw-r--r--src/libmach/crackelf.c8
-rw-r--r--src/libmach/elfcorefreebsd386.c2
-rw-r--r--src/libmach/elfcorelinux386.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/libmach/crackelf.c b/src/libmach/crackelf.c
index 6ed3ee51..682d9a72 100644
--- a/src/libmach/crackelf.c
+++ b/src/libmach/crackelf.c
@@ -6,7 +6,7 @@
static int mapelf(Fhdr *fp, ulong base, Map *map, Regs**);
static int mapcoreregs(Fhdr *fp, Map *map, Regs**);
-static char *getcorecmd(Fhdr *fp, Map *map);
+static char *getcorecmd(Fhdr *fp);
static struct
{
@@ -141,6 +141,8 @@ crackelf(int fd, Fhdr *fp)
elf->corecmd = ctab[i].corecmd;
break;
}
+ if((fp->cmd = getcorecmd(fp)) == nil)
+ fprint(2, "warning: reading core command: %r");
return 0;
}
@@ -259,8 +261,6 @@ mapelf(Fhdr *fp, ulong base, Map *map, Regs **regs)
if(fp->ftype == FCORE){
if(mapcoreregs(fp, map, regs) < 0)
fprint(2, "warning: reading core regs: %r");
- if((fp->cmd = getcorecmd(fp, map)) == nil)
- fprint(2, "warning: reading core command: %r");
}
return 0;
@@ -352,7 +352,7 @@ mapcoreregs(Fhdr *fp, Map *map, Regs **rp)
}
static char*
-getcorecmd(Fhdr *fp, Map *map)
+getcorecmd(Fhdr *fp)
{
int i;
uchar *a, *sa, *ea;
diff --git a/src/libmach/elfcorefreebsd386.c b/src/libmach/elfcorefreebsd386.c
index 84f6c0fd..847a93fa 100644
--- a/src/libmach/elfcorefreebsd386.c
+++ b/src/libmach/elfcorefreebsd386.c
@@ -108,7 +108,7 @@ corecmdfreebsd386(Elf *elf, ElfNote *note, char **pp)
return -1;
}
p = (Psinfo*)note->desc;
- print("elf name %s\nelf args %s\n", p->name, p->psargs);
+ // print("elf name %s\nelf args %s\n", p->name, p->psargs);
t = malloc(80+1);
if(t == nil)
return -1;
diff --git a/src/libmach/elfcorelinux386.c b/src/libmach/elfcorelinux386.c
index 8fa74ab9..9e8d0aa9 100644
--- a/src/libmach/elfcorelinux386.c
+++ b/src/libmach/elfcorelinux386.c
@@ -83,7 +83,7 @@ corecmdlinux386(Elf *elf, ElfNote *note, char **pp)
return -1;
}
p = (Psinfo*)note->desc;
- print("elf name %s\nelf args %s\n", p->fname, p->psargs);
+ // print("elf name %s\nelf args %s\n", p->fname, p->psargs);
t = malloc(80+1);
if(t == nil)
return -1;