From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 85075 invoked by alias); 10 Oct 2017 09:12:19 -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 84679 invoked by uid 89); 10 Oct 2017 09:12:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:736, FLAT, sash X-HELO: helium.openadk.org Received: from helium.openadk.org (HELO helium.openadk.org) (89.238.66.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 10 Oct 2017 09:12:17 +0000 Received: by helium.openadk.org (Postfix, from userid 1000) id D4B451078B; Tue, 10 Oct 2017 11:12:14 +0200 (CEST) Date: Tue, 10 Oct 2017 09:12:00 -0000 From: Waldemar Brodkorb To: gdb@sourceware.org Subject: debugging uClinux application with GDB simulator Message-ID: <20171010091214.GC7617@waldemar-brodkorb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2017-10/txt/msg00031.txt.bz2 Hi GDB hackers, I would like to debug an issue with vfork() function from uClibc-ng for h8/300 architecture. How it is supposed to work? I can successfully load a Linux kernel with piggyback initramfs and the sash shell in GDB simulator. As soon as I try to exec another application it fails. I think it might be a bug in vfork function. As it is implemented in assembly I can not try to do simple printf debugging. The binary format used for this architecture is FLAT and all C library functions are statically linked into the sash binary. As I start the GDB simulator with the kernel I can not break into vfork() as it is not yet loaded. Any hints? thanks in advance, Waldemar