From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24865 invoked by alias); 17 Oct 2009 17:02:47 -0000 Received: (qmail 24750 invoked by uid 22791); 17 Oct 2009 17:02:46 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 17 Oct 2009 17:02:42 +0000 Received: from jupiter.vmware.com (mailhost5.vmware.com [10.16.68.131]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 62B863104D; Sat, 17 Oct 2009 10:02:41 -0700 (PDT) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by jupiter.vmware.com (Postfix) with ESMTP id 52CF3DC056; Sat, 17 Oct 2009 10:02:41 -0700 (PDT) Message-ID: <4AD9F759.3010807@vmware.com> Date: Sat, 17 Oct 2009 23:03:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: fpga CC: "gdb@sourceware.org" Subject: Re: stepping through a flat binary in qemu References: <25936753.post@talk.nabble.com> In-Reply-To: <25936753.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: 2009-10/txt/msg00283.txt.bz2 fpga wrote: > Hi. > I'm trying to step through a tiny real-to-pmode os in qemu using gdb. > > I'm using > nasm -f bin emakeimg.asm -o enth.fbin > to assemble the thing and then pasting the 16bit flat binary to a floppy > image > i.e. no debugging symbols. > > I've booted the os in qemu with > "qemu -s -S -fda boot.img -boot a" > & also without "-s" (use gstabs) > > In another terminal I debug the same image and connect to qemu via > "target remote localhost:1234". > If I type "cont" the OS starts to execute. > > If I try to step by typing "break" gdb complains about no symbols. > Is it possible to step through this 16 bit bootloader code and into the OS > proper with no symbols & if not what's the easiest way of putting symbols > in. > > I have a problem that if I try to assemble as elf, I have multiple [ORG > statements in the code] which only bin files recognise. > > Any help much appreciated. Probably need to use stepi, since step depends on line symbols.