From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19277 invoked by alias); 16 Jul 2010 19:12:15 -0000 Received: (qmail 19263 invoked by uid 22791); 16 Jul 2010 19:12:14 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Jul 2010 19:12:08 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6GJC78d021678 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 16 Jul 2010 15:12:07 -0400 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6GJC4Jn020571 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 16 Jul 2010 15:12:06 -0400 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o6GJC4wD021285; Fri, 16 Jul 2010 21:12:04 +0200 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o6GJC4Z6021284; Fri, 16 Jul 2010 21:12:04 +0200 Date: Fri, 16 Jul 2010 19:12:00 -0000 From: Jan Kratochvil To: Petr =?utf-8?Q?Hluz=C3=ADn?= Cc: G , gdb@sourceware.org Subject: Re: Debugging variable arguments functions (stdarg) Message-ID: <20100716191203.GA20877@host1.dyn.jankratochvil.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-12-10) X-IsSubscribed: yes 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 X-SW-Source: 2010-07/txt/msg00063.txt.bz2 On Fri, 16 Jul 2010 20:57:57 +0200, Petr Hluzín wrote: > Workaround B: > Get value of stack pointer (RSP?) of frame MysqlWrapper() and dump raw > memory around the address. You should see these values somewhere > around: > 0x00000000004041e2 (return address in MysqlWrapper) > 0x406bf0 (the third argument to WriteLog) > Between these two values should be the values of 3rd and 4th argument. This is not so simple on x86_64, it passes even (first few) stdarg parameters in registers. http://www.x86-64.org/documentation/abi.pdf Regards, Jan