public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Is there a way to debug /sbin/init process?
@ 2006-08-24 15:22 fei huang
  2006-08-25  5:57 ` Dirk Heinrichs
  0 siblings, 1 reply; 8+ messages in thread
From: fei huang @ 2006-08-24 15:22 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 423 bytes --]

I'm running a user mode linux on my Gentoo box, and trying to debug the
/sbin/init process, but seems no way to emerge the sysvinit with debug flag
on, perhaps not all packages support the use flag..

lots of articles around there talking about debugging kernel, uh,, not for
init...  can I just compile one manually and replace the executable with
mine?

any ideas? tks. ( or any available resources pls)

regards

daniel

[-- Attachment #2: Type: text/html, Size: 471 bytes --]

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

* Re: [gentoo-user] Is there a way to debug /sbin/init process?
  2006-08-24 15:22 [gentoo-user] Is there a way to debug /sbin/init process? fei huang
@ 2006-08-25  5:57 ` Dirk Heinrichs
  2006-08-25  7:10   ` fei huang
  0 siblings, 1 reply; 8+ messages in thread
From: Dirk Heinrichs @ 2006-08-25  5:57 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 735 bytes --]

Am Donnerstag, 24. August 2006 17:22 schrieb ext fei huang:
> I'm running a user mode linux on my Gentoo box, and trying to debug the
> /sbin/init process, but seems no way to emerge the sysvinit with debug
> flag on, perhaps not all packages support the use flag..

Don't forget to emerge it with FEATURES="nostrip". Otherwise your debug 
symbols will be stripped out again.

HTH...

	Dirk
-- 
Dirk Heinrichs          | Tel:  +49 (0)162 234 3408
Configuration Manager   | Fax:  +49 (0)211 47068 111
Capgemini Deutschland   | Mail: dirk.heinrichs@capgemini.com
Hambornerstraße 55      | Web:  http://www.capgemini.com
D-40472 Düsseldorf      | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-user] Is there a way to debug /sbin/init process?
  2006-08-25  5:57 ` Dirk Heinrichs
@ 2006-08-25  7:10   ` fei huang
  2006-08-25  7:56     ` Dirk Heinrichs
  2006-08-25  8:30     ` Etaoin Shrdlu
  0 siblings, 2 replies; 8+ messages in thread
From: fei huang @ 2006-08-25  7:10 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]

On 8/25/06, Dirk Heinrichs <ext-dirk.heinrichs@nokia.com> wrote:
>
> Am Donnerstag, 24. August 2006 17:22 schrieb ext fei huang:
> > I'm running a user mode linux on my Gentoo box, and trying to debug the
> > /sbin/init process, but seems no way to emerge the sysvinit with debug
> > flag on, perhaps not all packages support the use flag..
>
> Don't forget to emerge it with FEATURES="nostrip". Otherwise your debug
> symbols will be stripped out again.


tks, but the sysvinit package does not have a debug use flag (through equery
uses syvinit), added the line "sys-apps/sysvinit debug" to
/etc/portage/package.use, no use at all, gdb complains no debug symbol
found..... mm, I ever emerged firefox with debug flag on, that worked coz
mozilla-firefox does  have  a  debug use flag!..

no idea how to do it under Gentoo...

daniel

HTH...
>
>         Dirk
> --
> Dirk Heinrichs          | Tel:  +49 (0)162 234 3408
> Configuration Manager   | Fax:  +49 (0)211 47068 111
> Capgemini Deutschland   | Mail: dirk.heinrichs@capgemini.com
> Hambornerstraße 55      | Web:  http://www.capgemini.com
> D-40472 Düsseldorf      | ICQ#: 110037733
> GPG Public Key C2E467BB | Keyserver: www.keyserver.net
>
>
>

[-- Attachment #2: Type: text/html, Size: 2070 bytes --]

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

* Re: [gentoo-user] Is there a way to debug /sbin/init process?
  2006-08-25  7:10   ` fei huang
@ 2006-08-25  7:56     ` Dirk Heinrichs
  2006-08-25  8:30     ` Etaoin Shrdlu
  1 sibling, 0 replies; 8+ messages in thread
From: Dirk Heinrichs @ 2006-08-25  7:56 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 720 bytes --]

Am Freitag, 25. August 2006 09:10 schrieb ext fei huang:

> tks, but the sysvinit package does not have a debug use flag (through
> equery uses syvinit), added the line "sys-apps/sysvinit debug" to
> /etc/portage/package.use, no use at all, gdb complains no debug symbol
> found.....
>
> no idea how to do it under Gentoo...

What about adding -g to CFLAGS?

Bye...

	Dirk
-- 
Dirk Heinrichs          | Tel:  +49 (0)162 234 3408
Configuration Manager   | Fax:  +49 (0)211 47068 111
Capgemini Deutschland   | Mail: dirk.heinrichs@capgemini.com
Hambornerstraße 55      | Web:  http://www.capgemini.com
D-40472 Düsseldorf      | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-user] Is there a way to debug /sbin/init process?
  2006-08-25  7:10   ` fei huang
  2006-08-25  7:56     ` Dirk Heinrichs
@ 2006-08-25  8:30     ` Etaoin Shrdlu
       [not found]       ` <5cd9791d0608250212t1a201d45u334713792c91d412@mail.gmail.com>
  2006-08-25 13:46       ` Michael Crute
  1 sibling, 2 replies; 8+ messages in thread
From: Etaoin Shrdlu @ 2006-08-25  8:30 UTC (permalink / raw
  To: gentoo-user

On Friday 25 August 2006 09:10, fei huang wrote:

> no idea how to do it under Gentoo...

As a last resort, you can compile it manually from sources with the 
appropriate options and copy the init binary under /sbin. Of course, be 
sure you know what you're doing. I suggest you rename the original init 
binary to use it again in case something goes wrong (with init= on the 
command line).
-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] Is there a way to debug /sbin/init process?
       [not found]       ` <5cd9791d0608250212t1a201d45u334713792c91d412@mail.gmail.com>
@ 2006-08-25  9:44         ` Richard Fish
  2006-08-25 13:23           ` fei huang
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Fish @ 2006-08-25  9:44 UTC (permalink / raw
  To: gentoo-user

On 8/25/06, fei huang <daniel.huangfei@gmail.com> wrote:
> wonder why gentoo does not support debug flag on ALL packages, but just to a
> small range of ebuilds?
> any good reason for that .?  don't know.

The debug use flag is normally (and IMO should only be) used for
optional debugging/logging systems that can be built-in to packages,
not for debug symbols like you get with CFLAGS=-g.  It sometimes also
adds -g, but it is really more for the optional parts of packages that
can be included regardless of the CFLAGS.

To illustrate my point, USE=debug has the following effects on:

* app-emulation/wine: enables the use of the WINE_DEBUG environment
variable to generate debug output.
* media-sound/alsa-driver: adds extra logging about the sound card
configuration and inner-workings of alsa to the system logs.

-Richard
-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] Is there a way to debug /sbin/init process?
  2006-08-25  9:44         ` Richard Fish
@ 2006-08-25 13:23           ` fei huang
  0 siblings, 0 replies; 8+ messages in thread
From: fei huang @ 2006-08-25 13:23 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1053 bytes --]

On 8/25/06, Richard Fish <bigfish@asmallpond.org> wrote:
>
> On 8/25/06, fei huang <daniel.huangfei@gmail.com> wrote:
> > wonder why gentoo does not support debug flag on ALL packages, but just
> to a
> > small range of ebuilds?
> > any good reason for that .?  don't know.
>
> The debug use flag is normally (and IMO should only be) used for
> optional debugging/logging systems that can be built-in to packages,
> not for debug symbols like you get with CFLAGS=-g.  It sometimes also
> adds -g, but it is really more for the optional parts of packages that
> can be included regardless of the CFLAGS.


so, they are distinct concepts.

To illustrate my point, USE=debug has the following effects on:
>
> * app-emulation/wine: enables the use of the WINE_DEBUG environment
> variable to generate debug output.
> * media-sound/alsa-driver: adds extra logging about the sound card
> configuration and inner-workings of alsa to the system logs.
>
> -Richard
> --


It does make sense.. thank you so much..

daniel

gentoo-user@gentoo.org mailing list
>
>

[-- Attachment #2: Type: text/html, Size: 1809 bytes --]

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

* Re: [gentoo-user] Is there a way to debug /sbin/init process?
  2006-08-25  8:30     ` Etaoin Shrdlu
       [not found]       ` <5cd9791d0608250212t1a201d45u334713792c91d412@mail.gmail.com>
@ 2006-08-25 13:46       ` Michael Crute
  1 sibling, 0 replies; 8+ messages in thread
From: Michael Crute @ 2006-08-25 13:46 UTC (permalink / raw
  To: gentoo-user

On 8/25/06, Etaoin Shrdlu <shrdlu@unlimitedmail.org> wrote:
> On Friday 25 August 2006 09:10, fei huang wrote:
>
> > no idea how to do it under Gentoo...
>
> As a last resort, you can compile it manually from sources with the
> appropriate options and copy the init binary under /sbin. Of course, be
> sure you know what you're doing. I suggest you rename the original init
> binary to use it again in case something goes wrong (with init= on the
> command line).

Or you could patch the ebuild so that it allows debugging and put it
in your overlay. Thats probably better than manually compiling from
source.

-Mike

-- 
________________________________
Michael E. Crute
http://mike.crute.org

I may not have gone where I intended to go, but I think I have ended
up where I intended to be. --Douglas Adams
-- 
gentoo-user@gentoo.org mailing list



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

end of thread, other threads:[~2006-08-25 13:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-24 15:22 [gentoo-user] Is there a way to debug /sbin/init process? fei huang
2006-08-25  5:57 ` Dirk Heinrichs
2006-08-25  7:10   ` fei huang
2006-08-25  7:56     ` Dirk Heinrichs
2006-08-25  8:30     ` Etaoin Shrdlu
     [not found]       ` <5cd9791d0608250212t1a201d45u334713792c91d412@mail.gmail.com>
2006-08-25  9:44         ` Richard Fish
2006-08-25 13:23           ` fei huang
2006-08-25 13:46       ` Michael Crute

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