From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16199 invoked by alias); 27 Nov 2006 14:58:03 -0000 Received: (qmail 16018 invoked by uid 22791); 27 Nov 2006 14:58:00 -0000 X-Spam-Check-By: sourceware.org Received: from mo-p00-ob.rzone.de (HELO mo-p00-ob.rzone.de) (81.169.146.162) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 27 Nov 2006 14:57:49 +0000 Received: from ollie.block.home (dslb-084-063-175-060.pools.arcor-ip.net [84.63.175.60]) by post.webmailer.de (mrclete mo44) (RZmta 3.4) with ESMTP id iARDqXuN053f6E; Mon, 27 Nov 2006 15:57:43 +0100 (MET) Date: Mon, 27 Nov 2006 14:58:00 -0000 From: Oliver Block Reply-To: lists@block-online.eu To: gdb@sourceware.org User-Agent: KMail/1.7.1 Cc: suse-programming-e@suse.com MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200611271557.09413.lists@block-online.eu> Subject: lib failure? Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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: 2006-11/txt/msg00177.txt.bz2 Hello, I was facing a problem with a functio I wrote, checking if a file exists withing the fs. When I was debuggin that , I set 2 breakpoints, the first to the function file_exists and the second to the function call of file_exists inside the program. I got the following output **************************** gdb ************************************ Breakpoint 2, main (argc=1, argv=0xbffff1c4) at ddnscli.c:712 712 if(file_exists(lockfile)) (gdb) s Breakpoint 1, file_exists (fname=0xbffff110 "disabled") at ddnscli.c:689 689 if( (rval = stat( fname, &attribut)) == -1) (gdb) s __stat (file=0xbffff070 "\200", buf=0xbffff070) at stat.c:51 51 stat.c: Datei oder Verzeichnis nicht gefunden. in stat.c (gdb) bt full #0 __stat (file=0xbffff070 "\200", buf=0xbffff070) at stat.c:51 No locals. #1 0x0804a56b in file_exists (fname=0xbffff110 "disabled") at ddnscli.c:689 attribut = {st_dev = 128, __pad1 = 34760, st_ino = 7, st_mode = 53, st_nlink = 1075277812, st_uid = 1075283840, st_gid = 134522768, st_rdev = 4615200421588234412, __pad2 = 34688, st_size = 40, st_blksize = 1075277812, st_blocks = 1073835200, st_atime = 134522768, st_atimensec = 3221221564, st_mtime = 1074560382, st_mtimensec = 40, st_ctime = 1075277812, st_ctimensec = 3221221592, __unused4 = 1074559989, __unused5 = 40} rval = 1075277812 ************************************************************************************* __stat (file=0xbffff070 "\200", buf=0xbffff070) at stat.c:51 both arguments of stat hold the same address. file should be AFAIK fname=0xbffff110. I isolated the function to a test_program and it works fine there. Any ideas? Regards, Oliver -- Leben ist mehr als ...