From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by sourceware.org (Postfix) with ESMTPS id 874153957061 for ; Tue, 12 May 2020 21:35:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 874153957061 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wm1-x32b.google.com with SMTP id u16so25637867wmc.5 for ; Tue, 12 May 2020 14:35:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=B5lLkylepWrwYdbI800h7gg3ThqOUVhFOKpe0eEsDJY=; b=Ca7muw93meN00LKGCl+tQqKIJJIvanfnMgHHLcLStcVVCqf8c/UhLB9ouweoy0DA/a QVr6tc0h/oEeAyw6Hq4tFSJ5Qs+oiURzxq5nCsyx0dxJlpCTk9RiqYCdkQpzE+l9XSdG uSjnBIcdsnc7bFcQtXwqB48X/RTj+tqSGEiIbDntDENS3g3F2wbihxTquiWy6w10K2XY sYYM8b2/zL5dfHySNSwp1v1IWg7z8bv9k+SibGiiHiPluZgsMMJOMqtVmjx1+p3NnrAC +W3WRGYXQOHZricHm9Tp7+mTqcWKcJM72kmP5dMNRIxC5Z0pIBC+IWAXdSY9/JQCGhcG T/ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=B5lLkylepWrwYdbI800h7gg3ThqOUVhFOKpe0eEsDJY=; b=qFwwueddFJM40JlZpEe942IweDorDRZI4RzBT+BPA9Q1+ijiJTs6YQ9HK1sGRrSSyb LEqtAaw6Ya18cdcGQiFO5H6lfqxN6Kz1pDCyPA4e66WqtYmUVjVSRYSDAOK59UiT0DLT 0/3UXMscEwuFN+4z0+oIpT9DwEDtymS42oPZixk0H12oPreuL06NtPW/IyJ8eNfJ1jsm q34sQF1k8VqF9CAuMxIN6wHDqgkircEXsW8COjaYn24JTc2gWPrT0eZa1E6zJa/7xi7Y LpxN3/TAugZT+FOCK8XHT/9xUhY80X2hRjucQsZYeR3XYqIjhF18nhDV7G9dps2BsDa2 FmTA== X-Gm-Message-State: AGi0PubM3/sw9YDJ/+kKjjB4t0lzhtN/fCtQHWDiuZScJCiEczAfd2hx 2geWOWxNJw7nGV2cl3fol9FAMJzJcZE= X-Google-Smtp-Source: APiQypK4mm13v90AbYVyqlhPt//t0SU1WeiKlkLdEThx6vwiHi+80VRcJgYzVUx91XLZaZzaRPvgUA== X-Received: by 2002:a1c:3281:: with SMTP id y123mr39522675wmy.30.1589319345756; Tue, 12 May 2020 14:35:45 -0700 (PDT) Received: from localhost (host81-151-181-184.range81-151.btcentralplus.com. [81.151.181.184]) by smtp.gmail.com with ESMTPSA id k5sm22914529wrx.16.2020.05.12.14.35.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2020 14:35:45 -0700 (PDT) Date: Tue, 12 May 2020 22:35:43 +0100 From: Andrew Burgess To: Kunal Chauhan Cc: gdb@sourceware.org Subject: Re: Help: debug binary Message-ID: <20200512213543.GR2214@embecosm.com> References: <20200512202240.GC2242921@embecosm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux/5.5.17-200.fc31.x86_64 (x86_64) X-Uptime: 22:28:10 up 22 days, 10:20, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2020 21:35:49 -0000 * Kunal Chauhan [2020-05-13 02:37:47 +0530]: > Is gdb binary core.file this can be run or developement system ? Means is > it necessary to run on target board It depends what your setup is, and what you want to do. You'll need a GDB built to debug your target environment. That doesn't mean you can't run that GDB on a totally different machine. So on my X86-64/Linux desktop I can build GDB to debug RISC-V. I then run that GDB on my x86-64 machine, and connect to a remote RISC-V target and debug. If that target can produce core files I can copy those to my local machine and use the RISC-V GDB to debug them. You can feel free to expand on your questions a little, explain what your setup is, what you'd like to achieve, what you've tried, and why the results you see aren't what you expect. This will make it much easier for people to help you. Thanks, Andrew > > On 13 May 2020 1:52 a.m., "Andrew Burgess" > wrote: > > > * Kunal Chauhan via Gdb [2020-05-13 01:05:32 +0530]: > > > > > Hi Team > > > As I am new to core files and gdb > > > >> How core file looks like in unix ? > > > >>Can we use gdb to findout crash from core files? at development > > > system. > > > > You don't really need to know the details of the core file format, you > > just need the core file and the corresponding binary and you can debug > > this with GDB. See: > > > > https://sourceware.org/gdb/current/onlinedocs/gdb/ > > Invoking-GDB.html#Invoking-GDB > > > > Basically you want: > > > > $ gdb application.exe core.file > > > > Then you should be able to investigate the state of the target at the > > time it produced the core file. > > > > Good luck, > > Andrew > > > > > > > > > > > > > > On Tue, May 12, 2020 at 8:54 AM Kunal Chauhan > > > wrote: > > > > > > > Hi Team > > > > > > > > I am new to the stuff of debugging and do not know any memory tools. > > > > > > > > 1. I have logs of binary and have only development machine. I searched > > my > > > > logs and prints shows something like. > > > > > > > > Void f1() > > > > { > > > > F1() > > > > > > > > } > > > > > > > > 1.F1: returns the int val and after that binary crash . > > > > 2. In f1 some memory allocation and deallocation done for char* > > > > > > > > > > > > How can i check that particular function and file for memory crash . > > As i > > > > have develoment system where i can only compile my binary.? > > > > > > > > Please suggest some useful steps > > > > > > > > > > > > Thanks > > > > Kunal > > > > > > > > > > > > > > > > > > -- > > > *Thanks with Regards!* > > > > > > *Kunal Chauhan* > > > *Mob:09813614826* > > > *Mob:08860397903* > > > > > > *E-mail:atkunalchauhan@gmail.com * > >