From: Joel Brobecker <brobecker@adacore.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Python pretty-printing [1/6]
Date: Tue, 07 Apr 2009 18:24:00 -0000 [thread overview]
Message-ID: <20090407182431.GA7535@adacore.com> (raw)
In-Reply-To: <m3eiwabwut.fsf@fleche.redhat.com>
Hi Tom,
I hope this isn't too late a review to bring this up. I looked at
this series of patches last Friday, but I didn't have an internet
connection back then.
> 2009-01-25 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
> Tom Tromey <tromey@redhat.com>
>
> * configure, config.in: Regenerate.
> * configure.ac: Support for relocatable GDB datadir. Add
> --with-pythondir.
> * python/python.c (_initialize_python): Set pythondir or datadir
> as needed. Update sys.path.
> * maint.c (_initialize_maint_cmds): Add "maint set gdb_datadir".
> * defs.h (gdb_datadir): Declare.
> * main.c (gdb_datadir): New global.
> (captured_main): Initialize gdb_datadir.
I'm wondering whether we could implement this slightly differently.
Right now, this patch adds code that is conditional on wether some
macros are defined or not. For instance:
> +#ifdef PYTHONDIR
> + PyModule_AddStringConstant (gdb_module, "pythondir", PYTHONDIR);
> +#else
> + if (gdb_datadir)
> + PyModule_AddStringConstant (gdb_module, "datadir", gdb_datadir);
> +#endif
Can we change that, for instance by assuming that we always have
PYTHONDIR, and that by default, configure will set to the datadir?
I was going to comment on the ..._RELOCATABLE macro, but I see that
we're already using that idiom for at least the system gdbinit file.
--
Joel
next prev parent reply other threads:[~2009-04-07 18:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-02 20:54 Tom Tromey
2009-04-03 14:23 ` Eli Zaretskii
2009-04-03 15:46 ` Tom Tromey
2009-04-03 17:13 ` Eli Zaretskii
2009-04-04 21:43 ` Thiago Jung Bauermann
2009-04-05 3:12 ` Eli Zaretskii
2009-04-03 18:29 ` Tom Tromey
2009-04-03 19:14 ` Daniel Jacobowitz
2009-04-03 20:39 ` Tom Tromey
2009-04-03 15:23 ` Daniel Jacobowitz
2009-04-03 23:58 ` Tom Tromey
2009-04-04 3:30 ` Daniel Jacobowitz
2009-04-04 16:16 ` Tom Tromey
2009-04-04 9:10 ` Eli Zaretskii
2009-04-06 17:45 ` Tom Tromey
2009-04-06 20:38 ` Eli Zaretskii
2009-04-07 18:52 ` Daniel Jacobowitz
2009-04-07 18:24 ` Joel Brobecker [this message]
2009-04-07 18:43 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090407182431.GA7535@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox