From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30345 invoked by alias); 20 Jun 2006 22:53:14 -0000 Received: (qmail 29739 invoked by uid 22791); 20 Jun 2006 22:53:13 -0000 X-Spam-Check-By: sourceware.org Received: from natreg.rzone.de (HELO natreg.rzone.de) (81.169.145.183) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 20 Jun 2006 22:53:11 +0000 Received: from ollie.block.home (dslb-084-063-167-076.pools.arcor-ip.net [84.63.167.76]) (authenticated bits=0) by post.webmailer.de (8.13.6/8.13.6) with ESMTP id k5KMr6IB010946 for ; Wed, 21 Jun 2006 00:53:07 +0200 (MEST) From: Oliver Block Reply-To: lists@block-online.eu To: gdb@sourceware.org Subject: how to show cause of segmentation fault with gdb Date: Tue, 20 Jun 2006 22:55:00 -0000 User-Agent: KMail/1.7.1 MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200606210052.45882.lists@block-online.eu> 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-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00158.txt.bz2 Hi, the last days I faced the following problem. I was writing a program that used c-client library. I defined and assigned a char *myvar; and the function expected a char myvar[]; Because a deeper function needed write access to that variable the program stopped with a segmentation fault. Someone else gave me a hint which is most likely the cause of the error. But he guessed, actually. Is there a safe way show the cause of that error using gdb. Best Regards, Oliver