Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Definition of PT_TEXT_ADDR and friends.
@ 2007-03-20  6:50 Josef Wolf
  2007-03-20 10:56 ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Josef Wolf @ 2007-03-20  6:50 UTC (permalink / raw)
  To: gdb

Hello!

When compiling gdb for uClinux with armnommu, I noticed that (in
linux-low.c) PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR are
defined only when __mcoldfire__ is defined.  I think this is wrong.
Instead, IMHO, it should always be defined when we have linux without
a mmu.

Comments?


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

* Re: Definition of PT_TEXT_ADDR and friends.
  2007-03-20  6:50 Definition of PT_TEXT_ADDR and friends Josef Wolf
@ 2007-03-20 10:56 ` Daniel Jacobowitz
  2007-03-21  7:20   ` Josef Wolf
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2007-03-20 10:56 UTC (permalink / raw)
  To: Josef Wolf, gdb

On Tue, Mar 20, 2007 at 07:44:56AM +0100, Josef Wolf wrote:
> Hello!
> 
> When compiling gdb for uClinux with armnommu, I noticed that (in
> linux-low.c) PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR are
> defined only when __mcoldfire__ is defined.  I think this is wrong.
> Instead, IMHO, it should always be defined when we have linux without
> a mmu.
> 
> Comments?

/* These should really be defined in the kernel's ptrace.h header.  */

We don't know what to define them _to_ on other platforms.  If you
have another platform which fails to define them in the kernel
headers, we can add another case.

(I know the __UCLIBC_HAS_MMU__ is out of date - I'm going to fix that
today)

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: Definition of PT_TEXT_ADDR and friends.
  2007-03-20 10:56 ` Daniel Jacobowitz
@ 2007-03-21  7:20   ` Josef Wolf
  2007-03-21 11:17     ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Josef Wolf @ 2007-03-21  7:20 UTC (permalink / raw)
  To: gdb

On Tue, Mar 20, 2007 at 06:56:18AM -0400, Daniel Jacobowitz wrote:
> On Tue, Mar 20, 2007 at 07:44:56AM +0100, Josef Wolf wrote:

> > When compiling gdb for uClinux with armnommu, I noticed that (in
> > linux-low.c) PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR are
> > defined only when __mcoldfire__ is defined.  I think this is wrong.
> > Instead, IMHO, it should always be defined when we have linux without
> > a mmu.
> > 
> > Comments?
> 
> /* These should really be defined in the kernel's ptrace.h header.  */
> 
> We don't know what to define them _to_ on other platforms.  If you
> have another platform which fails to define them in the kernel
> headers, we can add another case.

At least for uClinux, ptrace() is hardwired to the same values as in
linux-low.c.  So probably the comment is right and the defined should
be moved into uClinux's uc0-patch.  But I don't see why the dependency
on uclibc define.

> (I know the __UCLIBC_HAS_MMU__ is out of date - I'm going to fix that
> today)

Hmmm, what's the correct way to find out whether the cpu has mmu without
uclibc?  How does uclibc find out?


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

* Re: Definition of PT_TEXT_ADDR and friends.
  2007-03-21  7:20   ` Josef Wolf
@ 2007-03-21 11:17     ` Daniel Jacobowitz
  2007-03-21 17:50       ` Josef Wolf
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2007-03-21 11:17 UTC (permalink / raw)
  To: Josef Wolf, gdb

On Wed, Mar 21, 2007 at 08:14:12AM +0100, Josef Wolf wrote:
> At least for uClinux, ptrace() is hardwired to the same values as in
> linux-low.c.

For all architectures, really?  I'm surprised.

> So probably the comment is right and the defined should
> be moved into uClinux's uc0-patch.  But I don't see why the dependency
> on uclibc define.

uClibc or the kernel.  It's not GDB's business to keep track of that.

> > (I know the __UCLIBC_HAS_MMU__ is out of date - I'm going to fix that
> > today)
> 
> Hmmm, what's the correct way to find out whether the cpu has mmu without
> uclibc?  How does uclibc find out?

You configure it :-)  But they've renamed the configuration macro
recently.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: Definition of PT_TEXT_ADDR and friends.
  2007-03-21 11:17     ` Daniel Jacobowitz
@ 2007-03-21 17:50       ` Josef Wolf
  2007-03-21 18:03         ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Josef Wolf @ 2007-03-21 17:50 UTC (permalink / raw)
  To: gdb

On Wed, Mar 21, 2007 at 07:16:57AM -0400, Daniel Jacobowitz wrote:
> On Wed, Mar 21, 2007 at 08:14:12AM +0100, Josef Wolf wrote:

> > At least for uClinux, ptrace() is hardwired to the same values as in
> > linux-low.c.
> 
> For all architectures, really?  I'm surprised.

I was confused, so don't be surprised :-)  Every architecture has its
own implementation.

> > So probably the comment is right and the defined should
> > be moved into uClinux's uc0-patch.  But I don't see why the dependency
> > on uclibc define.
> 
> uClibc or the kernel.  It's not GDB's business to keep track of that.

I don't see how uclibc can provide them without kernel support.

> > > (I know the __UCLIBC_HAS_MMU__ is out of date - I'm going to fix that
> > > today)
> > 
> > Hmmm, what's the correct way to find out whether the cpu has mmu without
> > uclibc?  How does uclibc find out?
> 
> You configure it :-)  But they've renamed the configuration macro
> recently.

Shouldn't the kernel headers provide some appropriate macro?  There seem
to exist a CONFIG_MMU macro, but this is only checked and never set.


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

* Re: Definition of PT_TEXT_ADDR and friends.
  2007-03-21 17:50       ` Josef Wolf
@ 2007-03-21 18:03         ` Daniel Jacobowitz
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2007-03-21 18:03 UTC (permalink / raw)
  To: gdb; +Cc: Josef Wolf

On Wed, Mar 21, 2007 at 06:45:09PM +0100, Josef Wolf wrote:
> Shouldn't the kernel headers provide some appropriate macro?  There seem
> to exist a CONFIG_MMU macro, but this is only checked and never set.

I don't know, but none of the kernel's config macros should generally
be used outside the kernel - uClibc seems as good a place for it as any.

-- 
Daniel Jacobowitz
CodeSourcery


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

end of thread, other threads:[~2007-03-21 18:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-20  6:50 Definition of PT_TEXT_ADDR and friends Josef Wolf
2007-03-20 10:56 ` Daniel Jacobowitz
2007-03-21  7:20   ` Josef Wolf
2007-03-21 11:17     ` Daniel Jacobowitz
2007-03-21 17:50       ` Josef Wolf
2007-03-21 18:03         ` Daniel Jacobowitz

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