public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/15600] New: The use of PyFile_FromString and PyFile_AsFile causes build error in _WIN32 - IS_PY3K build
@ 2013-06-11  0:53 gldrayton at gmail dot com
  2015-05-03  6:54 ` [Bug python/15600] " orgads at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: gldrayton at gmail dot com @ 2013-06-11  0:53 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15600

            Bug ID: 15600
           Summary: The use of PyFile_FromString and PyFile_AsFile causes
                    build error in _WIN32 - IS_PY3K build
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: python
          Assignee: unassigned at sourceware dot org
          Reporter: gldrayton at gmail dot com

Source file -- gdb/python/python.c
Function -- python_run_simple_file (FILE *file, const char *filename)

The _WIN32 special handling for FILE differences between mingw gdb build and
mvsc build of python dll uses the python2 functions PyFile_FromString and
PyFile_AsFile to have Python create the FILE for gdb so that it uses the msvc
version of FILE.

These functions were deprecated (removed) with Python3 and in fact the Python
io subsystem was reworked. Most PyFile... functions have been removed.

I did some searching and there does not seem to be direct replacements for the
PyFile methods in Python3.  Most re-work solutions suggested importing the new
Python io module and then invoking io.open(), then using the
PyObject_AsFileDescriptor() (still supported in Py3) to get a file descriptor.

This doesn't appear to help in this case since the gdb code can't create a FILE
object that is acceptable to python.

I suspect that if a work-around already requires importing and calling python
code such as io.open(), it may be worth simply running the script in Python by
passing the file name into Python.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug python/15600] The use of PyFile_FromString and PyFile_AsFile causes build error in _WIN32 - IS_PY3K build
  2013-06-11  0:53 [Bug python/15600] New: The use of PyFile_FromString and PyFile_AsFile causes build error in _WIN32 - IS_PY3K build gldrayton at gmail dot com
@ 2015-05-03  6:54 ` orgads at gmail dot com
  2021-01-15 15:16 ` ssbssa at sourceware dot org
  2021-01-15 15:23 ` cbiesinger at google dot com
  2 siblings, 0 replies; 4+ messages in thread
From: orgads at gmail dot com @ 2015-05-03  6:54 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=15600

Orgad Shaneh <orgads at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |orgads at gmail dot com

--- Comment #1 from Orgad Shaneh <orgads at gmail dot com> ---
Any progress with this?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug python/15600] The use of PyFile_FromString and PyFile_AsFile causes build error in _WIN32 - IS_PY3K build
  2013-06-11  0:53 [Bug python/15600] New: The use of PyFile_FromString and PyFile_AsFile causes build error in _WIN32 - IS_PY3K build gldrayton at gmail dot com
  2015-05-03  6:54 ` [Bug python/15600] " orgads at gmail dot com
@ 2021-01-15 15:16 ` ssbssa at sourceware dot org
  2021-01-15 15:23 ` cbiesinger at google dot com
  2 siblings, 0 replies; 4+ messages in thread
From: ssbssa at sourceware dot org @ 2021-01-15 15:16 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=15600

Hannes Domani <ssbssa at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ssbssa at sourceware dot org

--- Comment #3 from Hannes Domani <ssbssa at sourceware dot org> ---
I think this was fixed with this commit:
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=272044897e178835f596c96740c5a1800ec6f9fb

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug python/15600] The use of PyFile_FromString and PyFile_AsFile causes build error in _WIN32 - IS_PY3K build
  2013-06-11  0:53 [Bug python/15600] New: The use of PyFile_FromString and PyFile_AsFile causes build error in _WIN32 - IS_PY3K build gldrayton at gmail dot com
  2015-05-03  6:54 ` [Bug python/15600] " orgads at gmail dot com
  2021-01-15 15:16 ` ssbssa at sourceware dot org
@ 2021-01-15 15:23 ` cbiesinger at google dot com
  2 siblings, 0 replies; 4+ messages in thread
From: cbiesinger at google dot com @ 2021-01-15 15:23 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=15600

Christian Biesinger <cbiesinger at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |cbiesinger at google dot com
         Resolution|---                         |FIXED

--- Comment #4 from Christian Biesinger <cbiesinger at google dot com> ---
Yes, this should work now.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2021-01-15 15:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-11  0:53 [Bug python/15600] New: The use of PyFile_FromString and PyFile_AsFile causes build error in _WIN32 - IS_PY3K build gldrayton at gmail dot com
2015-05-03  6:54 ` [Bug python/15600] " orgads at gmail dot com
2021-01-15 15:16 ` ssbssa at sourceware dot org
2021-01-15 15:23 ` cbiesinger at google dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).