From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93977 invoked by alias); 15 Jan 2016 00:02:48 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 93966 invoked by uid 89); 15 Jan 2016 00:02:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=massage, SYMBOL, kernel's, 0x13 X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 15 Jan 2016 00:02:46 +0000 Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with SMTP id 532FF34099A; Fri, 15 Jan 2016 00:02:44 +0000 (UTC) Date: Fri, 15 Jan 2016 00:02:00 -0000 From: Mike Frysinger To: Jan Kratochvil Cc: Linux Mercedes , duane@duaneellis.com, gdb@sourceware.org Subject: Re: gdb cannot find "../sysdeps/unix/syscall-template.S" Message-ID: <20160115000243.GZ4894@vapier.lan> Mail-Followup-To: Jan Kratochvil , Linux Mercedes , duane@duaneellis.com, gdb@sourceware.org References: <20160114215549.GW4894@vapier.lan> <20160114144731.5c1bb9f86d671edec44bb378f25c04cc.7a526e7354.wbe@email03.secureserver.net> <20160114222340.GA4824@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fCmRXBY78W5odcVA" Content-Disposition: inline In-Reply-To: <20160114222340.GA4824@host1.jankratochvil.net> X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00022.txt.bz2 --fCmRXBY78W5odcVA Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2888 On 14 Jan 2016 23:23, Jan Kratochvil wrote: > On Thu, 14 Jan 2016 23:11:02 +0100, Linux Mercedes wrote: > > As Mike Frysinger points out, that source isn't going to > > be particularly helpful to look at anyway. > + > On Thu, 14 Jan 2016 22:47:31 +0100, duane@duaneellis.com wrote: > > The distribution you are using (ie: I'm using Ubuntu) should *NOT* comp= ile > > these files for GLIBC with debug records turned on > + > On Thu, 14 Jan 2016 22:55:49 +0100, Mike Frysinger wrote: > > that is a generated file from glibc, and having its source isn't really= useful. >=20 > I am very surprised by this reaction. why ? i'm talking about this one specific file which is literally generated assembly code for a syscall trampoline. let's look at one example: msgctl on x86_64. $ ar x /usr/lib64/libc.a msgctl.o $ objdump -dr msgctl.o msgctl.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <__msgctl>: 0: b8 47 00 00 00 mov $0x47,%eax 5: 0f 05 syscall=20 7: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax d: 0f 83 00 00 00 00 jae 13 <__msgctl+0x13> f: R_X86_64_PC32 __syscall_error-0x4 13: c3 retq=20=20=20 what exactly do you expect the syscall-template.S to provide that is useful= ? here's the file in case you were wondering: ... #if SYSCALL_CANCELLABLE # include #else # include #endif /* This indirection is needed so that SYMBOL gets macro-expanded. */ #define syscall_hidden_def(SYMBOL) hidden_def (SYMBOL) #define T_PSEUDO(SYMBOL, NAME, N) PSEUDO (SYMBOL, NAME, N) #define T_PSEUDO_NOERRNO(SYMBOL, NAME, N) PSEUDO_NOERRNO (SYMBOL, NAME, N) #define T_PSEUDO_ERRVAL(SYMBOL, NAME, N) PSEUDO_ERRVAL (SYMBOL, NAME, N) #define T_PSEUDO_END(SYMBOL) PSEUDO_END (SYMBOL) #define T_PSEUDO_END_NOERRNO(SYMBOL) PSEUDO_END_NOERRNO (SYMBOL) #define T_PSEUDO_END_ERRVAL(SYMBOL) PSEUDO_END_ERRVAL (SYMBOL) #if SYSCALL_NOERRNO /* This kind of system call stub never returns an error. We return the return value register to the caller unexamined. */ T_PSEUDO_NOERRNO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS) ret_NOERRNO T_PSEUDO_END_NOERRNO (SYSCALL_SYMBOL) #elif SYSCALL_ERRVAL /* This kind of system call stub returns the errno code as its return value, or zero for success. We may massage the kernel's return value to meet that ABI, but we never set errno here. */ T_PSEUDO_ERRVAL (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS) ret_ERRVAL T_PSEUDO_END_ERRVAL (SYSCALL_SYMBOL) #else /* This is a "normal" system call stub: if there is an error, it returns -1 and sets errno. */ T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS) ret T_PSEUDO_END (SYSCALL_SYMBOL) #endif syscall_hidden_def (SYSCALL_SYMBOL) ... if anything, using disassemble on the function directly is way more useful and readable. -mike --fCmRXBY78W5odcVA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWmDcjAAoJEEFjO5/oN/WBMaoP/1KOWIRwKf/PqZCdLUM/7+TF caSH3wCCpExrAnk/5fnjgMg1XLkeorGDiilC4ZmzKuh5LCIMJuL+CaNc07sn7ddn i3i8Trx5xxg2c3l1c3QHdgJKkcTn1+9p+Sz+Ci0532HeiJ3fwT93Ll23Dg5aDWP0 8d43bWZ5AnuMCwl4/yRW4Os+iVg+ZwnsAWYmDysutiR+/KozuxeN6Bs/i3TwSBzx 4LQZLiBGsGtnG1fFUVwzCxYnLLLdePEf39+DaJuN1vsBooHWPpmakpSBjbfYsIyW 1hXEke0xVHRx5exHnOqGXKPL94/Sw3CwCHz3LLIRhD7SjlcUg+adhGzrfBIJpzll 5OjpKR9voqWrlyRGoamLSzltzxNH9wkn7mAtGpBbeFvO+D+DVizMdtf3qRG0NzBz WM45eQVw3cmedP/Pv3bZcuV4sVhQbCOdHLfBjxpwEO9jk/fj9nQ2guYGHBoDeX6I GS3Lbk+wkEKqKybkoPHmKxCTwWYoaJwhN+6oYxlC0uWUhDXVL/evWqgQz4/2pFM1 SZkaktcKaiD38AfmZKbYqn16yjN/3KXFTS9hxEetscP5yNQxb5yKD7s/NoMttyVk ED4noNmKEIx7qpR6T9HI0JfXhf4u5Ih5sa66toUULS1FBCHOKpR0A0SlfaPOOJ2Q BXclKCIteHlrzrjQ6DVc =+tWP -----END PGP SIGNATURE----- --fCmRXBY78W5odcVA--