From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30224 invoked by alias); 23 Feb 2009 03:31:24 -0000 Received: (qmail 30215 invoked by uid 22791); 23 Feb 2009 03:31:24 -0000 X-SWARE-Spam-Status: No, hits=0.2 required=5.0 tests=BARRACUDA_BRBL,BAYES_05 X-Spam-Check-By: sourceware.org Received: from sd-1780.dedibox.fr (HELO sd-1780.dedibox.fr) (88.191.14.212) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 23 Feb 2009 03:31:17 +0000 Received: by sd-1780.dedibox.fr (Postfix, from userid 1003) id B16971790F; Mon, 23 Feb 2009 04:31:14 +0100 (CET) Date: Mon, 23 Feb 2009 03:31:00 -0000 From: Pierre-Alexandre Meyer To: gdb@sourceware.org Subject: gdb and segment registers Message-ID: <20090223033114.GB3005@panda> Reply-To: pierre@mouraf.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) 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-02/txt/msg00142.txt.bz2 Good evening, I am developing an application at the bootloader level that eventually jumps into protected mode. My testing is done using a virtual machine (tried via qemu and VMware Workstation) and remotely connecting gdb (Ubuntu Intrepid build - 6.8-debian) to it. It works great until the application jumps into protected mode when gdb becomes really confused. Setting a break point at the first function after protected mode doesn't work. With no break points, if I SIGINT the program after the jump, gdb is confused: Backtrace stopped: previous frame inner to this frame (corrupt stack?) I suppose this is because the segment registers were changed. Do I need to reload them somehow? I do have access to the registers but have no idea how accurate they are. Is there a way to read the descriptor tables and segment registers? This could help checking gdb's state. Thank you. (Please CC: me when replying, since I am not on the list) -- Pierre-Alexandre Meyer