From owner-freebsd-hackers Fri Jun 4 21:26: 5 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from Hydro.CAM.ORG (Hydro.CAM.ORG [198.168.100.7]) by hub.freebsd.org (Postfix) with ESMTP id 7761614BE4 for ; Fri, 4 Jun 1999 21:26:03 -0700 (PDT) (envelope-from intmktg@CAM.ORG) Received: from Ocean.CAM.ORG (Ocean.CAM.ORG [198.168.100.5]) by Hydro.CAM.ORG (8.8.8/8.8.4) with ESMTP id AAA13145 for ; Sat, 5 Jun 1999 00:25:58 -0400 (EDT) Date: Sat, 5 Jun 1999 00:26:00 -0400 (EDT) From: Marc Tardif To: freebsd-hackers@freebsd.org Subject: disassembling execve (fwd) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG ---------- Forwarded message ---------- Date: Fri, 4 Jun 1999 18:39:35 -0400 (EDT) From: Marc Tardif To: freebsd-questions@freebsd.org Subject: disassembling execve How can I disassemble the execve syscall? I tried compiling the following code: #include void main() { char *name[2]; name[0] = "/bin/date"; name[1] = NULL; execve(name[0], name, NULL); } ... using the following command: gcc -o program -ggdb -static program.c ... and then debugging with: gdb program ... followed by: disassemble main disassemble execve The gcc manpage specifies that "on systems that support dynamic linking, this prevents linking with the shared libraries" regarding the -static flag. I've noted changes when using 'disassemble main' and using the -static flag, so it seems FreeBSD is among such systems. Yet, when running disassemble execve (which is what appears in the main disassembly), I get: "No function contains the specified address." Well, I'm stumped, I can't find any way to disassemble execve. Please let me know if there's a way, the above procedure apparently works on linux platforms, though execve will appear as __execve in the main disassembly. Thanks in advance, Marc To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message