Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Running without Python
@ 2013-10-28 20:43 Paul Smith
  2013-10-28 20:53 ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Smith @ 2013-10-28 20:43 UTC (permalink / raw)
  To: GDB Development

I had a naive hope that if I built my own GDB (7.6) with Python support,
then I needed to copy it to another system to do some debugging (because
my code is compiled with GCC 4.8.1 and the other system doesn't have a
new-enough GDB to debug the new object file format) where that other
system didn't have an appropriate Python, that my GDB would still work.

Like, GDB would try to dlopen() the Python library, discover it wasn't
available, shrug, and continue on letting me debug using "classic"
commands with just some minor grumbling.

But, it pretty much just stops:

  $ my-gdb
  Could not find platform independent libraries <prefix>
  Could not find platform dependent libraries <exec_prefix>
  Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
  ImportError: No module named site
  $

Any thoughts about this?  I guess I need to build GDB twice, once with
Python for those systems that can use it and once without for those
systems that don't have it.  Is there any interest in making this work
"better"?

Cheers!


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

* Re: Running without Python
  2013-10-28 20:43 Running without Python Paul Smith
@ 2013-10-28 20:53 ` Tom Tromey
  2013-10-28 21:17   ` Paul Smith
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2013-10-28 20:53 UTC (permalink / raw)
  To: psmith; +Cc: GDB Development

>>>>> "Paul" == Paul Smith <psmith@gnu.org> writes:

Paul> But, it pretty much just stops:
Paul>   $ my-gdb
Paul>   Could not find platform independent libraries <prefix>
Paul>   Could not find platform dependent libraries <exec_prefix>
Paul>   Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Paul>   ImportError: No module named site
Paul>   $

Paul> Any thoughts about this?  I guess I need to build GDB twice, once with
Paul> Python for those systems that can use it and once without for those
Paul> systems that don't have it.  Is there any interest in making this work
Paul> "better"?

This should be better in a more recent gdb.  Please try git master.
We've made it so that if Python initialization fails, then gdb still
works but disables all the Python functionality.

However, we haven't done the dlopen thing.  It's been discussed but I
think it is difficult to do sanely, and especially difficult to do in a
way that handles differences between versions of libpython.

Tom


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

* Re: Running without Python
  2013-10-28 20:53 ` Tom Tromey
@ 2013-10-28 21:17   ` Paul Smith
  2013-10-29  2:07     ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Smith @ 2013-10-28 21:17 UTC (permalink / raw)
  To: Tom Tromey; +Cc: GDB Development

On Mon, 2013-10-28 at 14:53 -0600, Tom Tromey wrote:
> >>>>> "Paul" == Paul Smith <psmith@gnu.org> writes:
> 
> Paul> But, it pretty much just stops:
> Paul>   $ my-gdb
> Paul>   Could not find platform independent libraries <prefix>
> Paul>   Could not find platform dependent libraries <exec_prefix>
> Paul>   Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
> Paul>   ImportError: No module named site
> Paul>   $
> 
> Paul> Any thoughts about this?  I guess I need to build GDB twice, once with
> Paul> Python for those systems that can use it and once without for those
> Paul> systems that don't have it.  Is there any interest in making this work
> Paul> "better"?
> 
> This should be better in a more recent gdb.  Please try git master.
> We've made it so that if Python initialization fails, then gdb still
> works but disables all the Python functionality.

Is this in 7.6.1, or just master?

> However, we haven't done the dlopen thing.  It's been discussed but I
> think it is difficult to do sanely, and especially difficult to do in a
> way that handles differences between versions of libpython.

That's OK with me, actually, because I've linked python statically so I
don't have to worry about it.  It's just the support .py stuff that's
missing when I copy GDB around.

Cheers!


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

* Re: Running without Python
  2013-10-28 21:17   ` Paul Smith
@ 2013-10-29  2:07     ` Tom Tromey
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2013-10-29  2:07 UTC (permalink / raw)
  To: psmith; +Cc: GDB Development

>> This should be better in a more recent gdb.  Please try git master.
>> We've made it so that if Python initialization fails, then gdb still
>> works but disables all the Python functionality.

Paul> Is this in 7.6.1, or just master?

Just master.

Tom


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

end of thread, other threads:[~2013-10-29  2:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-28 20:43 Running without Python Paul Smith
2013-10-28 20:53 ` Tom Tromey
2013-10-28 21:17   ` Paul Smith
2013-10-29  2:07     ` Tom Tromey

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