Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Feature Request
@ 2013-11-12 17:02 Mark Manning
  2013-11-12 17:10 ` Jonas Maebe
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Manning @ 2013-11-12 17:02 UTC (permalink / raw)
  To: gdb

Not a huge fan of mailing lists, not sure I'm sending this to exactly
the right place but anyway here goes...

I am developing a Native Arm Forth compiler for an embedded Linux
device. This compiler can be though of as a JIT compiler in that the
opcodes it compiles are not written out to some separate object module
but are literally inserted directly into the existing compilers
process space.

This is causing me no end of grief regarding the debugging of said JIT
code because GDB flat refuses to simply disassemble and single step
any opcodes not associated with some debug info. There will never be
any debug information for the code being layed down by the compiler
because once the compiler is working NO debugger will ever be needed,
Forth simply does not require debuggers of this type.

Right now a debugger is needed but if I cannot reliably lay down
compiled code how can I expect to reliably lay down debug information
and pass this to the debugger I'm using?  This is a chicken/egg
problem.

So, I would like to request a feature that will allow GDB to simply
single step opcodes anywhere within the process space owned by the
application being debugged even if there is no debug symbols
associated with it.

I know GDB is open source but I stand a greater chance of being the
first man to land on the sun than I would have of ever making any
sense out of any of the GDB internals :)

Ty in advance (not holding my breath)

  Mark Manning

-- 
"When something can be read without effort,
great effort has gone into its writing."

-- Enrique Jardiel Poncela --


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Feature Request
  2013-11-12 17:02 Feature Request Mark Manning
@ 2013-11-12 17:10 ` Jonas Maebe
  0 siblings, 0 replies; 2+ messages in thread
From: Jonas Maebe @ 2013-11-12 17:10 UTC (permalink / raw)
  To: Mark Manning; +Cc: gdb

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 7684 bytes --]


On 12 Nov 2013, at 18:02, Mark Manning wrote:

> So, I would like to request a feature that will allow GDB to simply
> single step opcodes anywhere within the process space owned by the
> application being debugged even if there is no debug symbols
> associated with it.

It already does that. Just use "si" (or "stepi") rather than "step" or "next". It can be useful to have "display/i $pc" active when doing so, so you can see what's the next instruction to be executed.


Jonas
From gdb-return-42821-listarch-gdb=sources.redhat.com@sourceware.org Tue Nov 12 20:03:19 2013
Return-Path: <gdb-return-42821-listarch-gdb=sources.redhat.com@sourceware.org>
Delivered-To: listarch-gdb@sources.redhat.com
Received: (qmail 8031 invoked by alias); 12 Nov 2013 20:03:18 -0000
Mailing-List: contact gdb-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <gdb.sourceware.org>
List-Subscribe: <mailto:gdb-subscribe@sourceware.org>
List-Archive: <http://sourceware.org/ml/gdb/>
List-Post: <mailto:gdb@sourceware.org>
List-Help: <mailto:gdb-help@sourceware.org>, <http://sourceware.org/ml/#faqs>
Sender: gdb-owner@sourceware.org
Delivered-To: mailing list gdb@sourceware.org
Received: (qmail 8020 invoked by uid 89); 12 Nov 2013 20:03:18 -0000
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.6 required=5.0 testsºYES_50,RDNS_NONE autolearn=no version=3.3.2
X-HELO: smtp2.ugent.be
Received: from Unknown (HELO smtp2.ugent.be) (157.193.49.126) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Nov 2013 20:03:16 +0000
Received: from localhost (mcheck2.ugent.be [157.193.49.249])	by smtp2.ugent.be (Postfix) with ESMTP id B8C5E12C37F	for <gdb@sourceware.org>; Tue, 12 Nov 2013 21:03:08 +0100 (CET)
Received: from smtp2.ugent.be ([IPv6:::ffff:157.193.49.126])	by localhost (mcheck2.UGent.be [::ffff:157.193.43.11]) (amavisd-new, port 10024)	with ESMTP id JqhdrKtAewUa for <gdb@sourceware.org>;	Tue, 12 Nov 2013 21:03:08 +0100 (CET)
Received: from [192.168.1.3] (unknown [109.130.25.41])	(Authenticated sender: jmaebe)	by smtp2.ugent.be (Postfix) with ESMTPSA id 79F0712C352	for <gdb@sourceware.org>; Tue, 12 Nov 2013 21:03:08 +0100 (CET)
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Apple Message framework v1085)
Subject: Re: Feature Request
From: Jonas Maebe <jonas.maebe@elis.ugent.be>
In-Reply-To: <CAPGNrUWJFSeSah05r58Ji0YLnOrXvsfdbSt1Kb-G-_Lu=ErwAw@mail.gmail.com>
Date: Tue, 12 Nov 2013 20:03:00 -0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <E738807D-ED0B-437B-B550-BCF9F7B9492D@elis.ugent.be>
References: <CAPGNrUVcug4xbAUD78WrtpZNV7B0TCVN1NzHaDArxtu6YU4zKA@mail.gmail.com> <CD00FA96-91D9-48C8-89D8-EFA30A22F47D@elis.ugent.be> <CAPGNrUWJFSeSah05r58Ji0YLnOrXvsfdbSt1Kb-G-_Lu=ErwAw@mail.gmail.com>
To: GDB Development <gdb@sourceware.org>
X-j-chkmail-Enveloppe: 5282897C.000 from unknown/41.25-130-109.adsl-dyn.isp.belgacom.be/109.130.25.41/[192.168.1.3]/<jonas.maebe@elis.ugent.be>
X-j-chkmail-Score: MSGID : 5282897C.000 on smtp2.ugent.be : j-chkmail score : X : R=. U=. O=## B=0.000 -> S=0.166
X-j-chkmail-Status: Ham
X-IsSubscribed: yes
X-SW-Source: 2013-11/txt/msg00047.txt.bz2
Content-length: 437


On 12 Nov 2013, at 20:59, Mark Manning wrote:

> actually no, it wont.  it will not execute code that does not have
> debug associated with it.  ... for example (in ascii art)

It's definitely unrelated to whether or not there is debug information for that code. I debug machine code without associated debug information using gdb all the time. It is however possible that the size of code sections is taken into account.


Jonas
From gdb-return-42822-listarch-gdb=sources.redhat.com@sourceware.org Tue Nov 12 20:34:51 2013
Return-Path: <gdb-return-42822-listarch-gdb=sources.redhat.com@sourceware.org>
Delivered-To: listarch-gdb@sources.redhat.com
Received: (qmail 2146 invoked by alias); 12 Nov 2013 20:34:51 -0000
Mailing-List: contact gdb-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <gdb.sourceware.org>
List-Subscribe: <mailto:gdb-subscribe@sourceware.org>
List-Archive: <http://sourceware.org/ml/gdb/>
List-Post: <mailto:gdb@sourceware.org>
List-Help: <mailto:gdb-help@sourceware.org>, <http://sourceware.org/ml/#faqs>
Sender: gdb-owner@sourceware.org
Delivered-To: mailing list gdb@sourceware.org
Received: (qmail 2135 invoked by uid 89); 12 Nov 2013 20:34:49 -0000
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.6 required=5.0 testsºYES_50,RDNS_NONE,URIBL_BLOCKED autolearn=no version=3.3.2
X-HELO: smtp2.ugent.be
Received: from Unknown (HELO smtp2.ugent.be) (157.193.49.126) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Nov 2013 20:34:48 +0000
Received: from localhost (mcheck2.ugent.be [157.193.49.249])	by smtp2.ugent.be (Postfix) with ESMTP id 5177912C295	for <gdb@sourceware.org>; Tue, 12 Nov 2013 21:34:40 +0100 (CET)
Received: from smtp2.ugent.be ([IPv6:::ffff:157.193.49.126])	by localhost (mcheck2.UGent.be [::ffff:157.193.43.11]) (amavisd-new, port 10024)	with ESMTP id bA6wZ-2G1Z4w for <gdb@sourceware.org>;	Tue, 12 Nov 2013 21:34:40 +0100 (CET)
Received: from [192.168.1.3] (unknown [109.130.25.41])	(Authenticated sender: jmaebe)	by smtp2.ugent.be (Postfix) with ESMTPSA id D843612C2A8	for <gdb@sourceware.org>; Tue, 12 Nov 2013 21:34:39 +0100 (CET)
From: Jonas Maebe <jonas.maebe@elis.ugent.be>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Subject: Fwd: Feature Request
Date: Tue, 12 Nov 2013 20:34:00 -0000
References: <CAPGNrUVVixsQ0poCdm-SSiHJsRrkUgLhEy8cWG6T6WEwntoHyg@mail.gmail.com>
To: GDB Development <gdb@sourceware.org>
Message-Id: <F0C30FDE-A33F-4FAC-B19F-995F21ED970C@elis.ugent.be>
Mime-Version: 1.0 (Apple Message framework v1085)
X-j-chkmail-Enveloppe: 528290D7.001 from unknown/41.25-130-109.adsl-dyn.isp.belgacom.be/109.130.25.41/[192.168.1.3]/<jonas.maebe@elis.ugent.be>
X-j-chkmail-Score: MSGID : 528290D7.001 on smtp2.ugent.be : j-chkmail score : . : R=. U=. O=. B=0.000 -> S=0.000
X-j-chkmail-Status: Ham
X-IsSubscribed: yes
X-SW-Source: 2013-11/txt/msg00048.txt.bz2
Content-length: 1380


From: Mark Manning <mark4th@gmail.com>
Date: 12 Nov 2013 21:15:12 GMT+01:00
To: Jonas Maebe <jonas.maebe@elis.ugent.be>
Subject: Re: Feature Request

yes. for example i just performed the following steps

1: strip my executable
2: gdb the stripped executable
3: set breakpoint at a known location thatn when single stepped will
jump to code that was written in during execution prior to hitting the
breakpoint
4: single step one opcode.  This results in "Can not access address 0".
5: disp /3i $pc.  this shows the program counter at the expected code
6: stepi.  this gives "can not find bounds of current function" and
displaying a disassembly from the program counter shows that nothing
was executed.



On Tue, Nov 12, 2013 at 3:03 PM, Jonas Maebe <jonas.maebe@elis.ugent.be> wrote:
> 
> On 12 Nov 2013, at 20:59, Mark Manning wrote:
> 
>> actually no, it wont.  it will not execute code that does not have
>> debug associated with it.  ... for example (in ascii art)
> 
> It's definitely unrelated to whether or not there is debug information for that code. I debug machine code without associated debug information using gdb all the time. It is however possible that the size of code sections is taken into account.
> 
> 
> Jonas



-- 
"When something can be read without effort,
great effort has gone into its writing."

-- Enrique Jardiel Poncela --


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-12 17:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-12 17:02 Feature Request Mark Manning
2013-11-12 17:10 ` Jonas Maebe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox