* Disabling sysroot [not found] ` <200805141603.35204.pedro@codesourcery.com> @ 2008-06-04 13:34 ` Marc Khouzam 2008-06-04 15:13 ` Daniel Jacobowitz 0 siblings, 1 reply; 8+ messages in thread From: Marc Khouzam @ 2008-06-04 13:34 UTC (permalink / raw) To: gdb Hi, in the doc it says: If you want to use `solib-search-path' instead of `sysroot', be sure to set `sysroot' to a nonexistent directory to prevent GDB from finding your host's libraries. Is there a recommended way to turn off sysroot? I can set it to something like /what/are/the/odds/of/this/dir/actually/existing But it is not very elegant. Can I set sysroot to "" or to "-" or some other symbol? Or is setting sysroot to anything not starting with a / sufficient? Thanks ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Disabling sysroot 2008-06-04 13:34 ` Disabling sysroot Marc Khouzam @ 2008-06-04 15:13 ` Daniel Jacobowitz 2008-06-04 15:20 ` Marc Khouzam 2008-06-04 17:38 ` Eli Zaretskii 0 siblings, 2 replies; 8+ messages in thread From: Daniel Jacobowitz @ 2008-06-04 15:13 UTC (permalink / raw) To: Marc Khouzam; +Cc: gdb On Wed, Jun 04, 2008 at 09:34:02AM -0400, Marc Khouzam wrote: > Hi, > > in the doc it says: > > If you want to use `solib-search-path' instead of > `sysroot', be sure to set `sysroot' to a nonexistent directory to prevent GDB > from finding your host's libraries. > > Is there a recommended way to turn off sysroot? > I can set it to something like /what/are/the/odds/of/this/dir/actually/existing > But it is not very elegant. I use /dev/null, which will never be a directory. There's no way to disable sysroot; setting it to empty is the same as not setting it at all, i.e. use the host's libraries. > Or is setting sysroot to anything not starting with a / sufficient? A relative path may be a valid sysroot; GDB will search from its current directory (there's no special check for absolute paths). -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Disabling sysroot 2008-06-04 15:13 ` Daniel Jacobowitz @ 2008-06-04 15:20 ` Marc Khouzam 2008-06-04 17:38 ` Eli Zaretskii 1 sibling, 0 replies; 8+ messages in thread From: Marc Khouzam @ 2008-06-04 15:20 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: gdb /dev/null it is. Thanks -----Original Message----- From: Daniel Jacobowitz [mailto:drow@false.org] Sent: Wed 6/4/2008 11:13 AM To: Marc Khouzam Cc: gdb@sourceware.org Subject: Re: Disabling sysroot On Wed, Jun 04, 2008 at 09:34:02AM -0400, Marc Khouzam wrote: > Hi, > > in the doc it says: > > If you want to use `solib-search-path' instead of > `sysroot', be sure to set `sysroot' to a nonexistent directory to prevent GDB > from finding your host's libraries. > > Is there a recommended way to turn off sysroot? > I can set it to something like /what/are/the/odds/of/this/dir/actually/existing > But it is not very elegant. I use /dev/null, which will never be a directory. There's no way to disable sysroot; setting it to empty is the same as not setting it at all, i.e. use the host's libraries. > Or is setting sysroot to anything not starting with a / sufficient? A relative path may be a valid sysroot; GDB will search from its current directory (there's no special check for absolute paths). -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Disabling sysroot 2008-06-04 15:13 ` Daniel Jacobowitz 2008-06-04 15:20 ` Marc Khouzam @ 2008-06-04 17:38 ` Eli Zaretskii 2008-06-05 15:08 ` Marc Khouzam 1 sibling, 1 reply; 8+ messages in thread From: Eli Zaretskii @ 2008-06-04 17:38 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: marc.khouzam, gdb > Date: Wed, 4 Jun 2008 11:13:13 -0400 > From: Daniel Jacobowitz <drow@false.org> > Cc: gdb@sourceware.org > > On Wed, Jun 04, 2008 at 09:34:02AM -0400, Marc Khouzam wrote: > > Hi, > > > > in the doc it says: > > > > If you want to use `solib-search-path' instead of > > `sysroot', be sure to set `sysroot' to a nonexistent directory to prevent GDB > > from finding your host's libraries. > > > > Is there a recommended way to turn off sysroot? > > I can set it to something like /what/are/the/odds/of/this/dir/actually/existing > > But it is not very elegant. > > I use /dev/null, which will never be a directory. Is this worth mentioning in the manual? ^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Disabling sysroot 2008-06-04 17:38 ` Eli Zaretskii @ 2008-06-05 15:08 ` Marc Khouzam 2008-06-05 15:23 ` Daniel Jacobowitz 0 siblings, 1 reply; 8+ messages in thread From: Marc Khouzam @ 2008-06-05 15:08 UTC (permalink / raw) To: Eli Zaretskii, Daniel Jacobowitz; +Cc: gdb > > I use /dev/null, which will never be a directory. > > Is this worth mentioning in the manual? It would have been helpful for me, so I vote for yes :-) It would be even nicer to have a way to 'turn off' sysroot for this case. Something like "unset sysroot". I'm not sure if "unset" is something that GDB supports. Marc ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Disabling sysroot 2008-06-05 15:08 ` Marc Khouzam @ 2008-06-05 15:23 ` Daniel Jacobowitz 2008-06-05 16:10 ` Marc Khouzam 0 siblings, 1 reply; 8+ messages in thread From: Daniel Jacobowitz @ 2008-06-05 15:23 UTC (permalink / raw) To: Marc Khouzam; +Cc: Eli Zaretskii, gdb On Thu, Jun 05, 2008 at 11:07:59AM -0400, Marc Khouzam wrote: > > > > I use /dev/null, which will never be a directory. > > > > Is this worth mentioning in the manual? > > It would have been helpful for me, so I vote for yes :-) > > It would be even nicer to have a way to 'turn off' sysroot > for this case. Something like "unset sysroot". I'm not > sure if "unset" is something that GDB supports. It is, but unsetting sysroot does not mean what you want. Without a sysroot, libraries are searched for in the root filesystem on the host. You want to actually disable searching by full path; gdb has no option for that. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Disabling sysroot 2008-06-05 15:23 ` Daniel Jacobowitz @ 2008-06-05 16:10 ` Marc Khouzam 2008-06-05 16:12 ` Paul Koning 0 siblings, 1 reply; 8+ messages in thread From: Marc Khouzam @ 2008-06-05 16:10 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: Eli Zaretskii, gdb > > It would be even nicer to have a way to 'turn off' sysroot > > for this case. Something like "unset sysroot". I'm not > > sure if "unset" is something that GDB supports. > > It is, but unsetting sysroot does not mean what you want. Without a > sysroot, libraries are searched for in the root filesystem on the > host. You want to actually disable searching by full path; gdb has no > option for that. From what I understand, it would be nice if unset sysroot disabled sysrtoot, while an explicit set sysrtoot "/" be used to search from the root. But, for the sake of backwards compatibility, this should probably be left alone and /dev/null used for sysrtoot to disable it. Marc ^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Disabling sysroot 2008-06-05 16:10 ` Marc Khouzam @ 2008-06-05 16:12 ` Paul Koning 0 siblings, 0 replies; 8+ messages in thread From: Paul Koning @ 2008-06-05 16:12 UTC (permalink / raw) To: marc.khouzam; +Cc: drow, eliz, gdb >>>>> "Marc" == Marc Khouzam <marc.khouzam@ericsson.com> writes: >> > It would be even nicer to have a way to 'turn off' sysroot > for >> this case. Something like "unset sysroot". I'm not > sure if >> "unset" is something that GDB supports. >> >> It is, but unsetting sysroot does not mean what you want. Without >> a sysroot, libraries are searched for in the root filesystem on >> the host. You want to actually disable searching by full path; >> gdb has no option for that. Marc> From what I understand, it would be nice if unset sysroot Marc> disabled sysrtoot, while an explicit set sysrtoot "/" be used Marc> to search from the root. But, for the sake of backwards Marc> compatibility, this should probably be left alone and /dev/null Marc> used for sysrtoot to disable it. There should be a user-friendly way to disable sysroot, and that should be on by default in a cross-gdb. paul ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-06-05 16:12 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <6D19CA8D71C89C43A057926FE0D4ADAA04291110@ecamlmw720.eamcs.ericsson.se>
[not found] ` <200805141603.35204.pedro@codesourcery.com>
2008-06-04 13:34 ` Disabling sysroot Marc Khouzam
2008-06-04 15:13 ` Daniel Jacobowitz
2008-06-04 15:20 ` Marc Khouzam
2008-06-04 17:38 ` Eli Zaretskii
2008-06-05 15:08 ` Marc Khouzam
2008-06-05 15:23 ` Daniel Jacobowitz
2008-06-05 16:10 ` Marc Khouzam
2008-06-05 16:12 ` Paul Koning
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox