Modify or replace it with official one to support python3

Message ID
State New, archived

Commit Message

傅继晗 Jan. 20, 2020, 12:02 p.m. UTC
  By default,gdb is compiled with python2 script support on OSX. However,when
compiled with arg "--with-python=/path/to/python3 " to support python3
,some error occurred that seems python3 is not recognized.
The reason is that the is not the same as the official
one.BTW,this issue was once referred at 20 Dec 2012 mail :
Somehow,It is not committed(maybe the maintainer forgot it due to the happy
chrismas holiday).
And here is my patch:

index: b/gdb/python/


--- a/gdb/python/
+++ b/gdb/python/
@@ -72,7 +72,7 @@  for opt in opt_flags:
                     libs.insert(0, '-L' + getvar('LIBPL'))
                 elif == 'nt':
                     libs.insert(0, '-L' + sysconfig.PREFIX + '/libs')
-            if getvar('LINKFORSHARED') is not None:
+            if not getvar('PYTHONFRAMEWORK'):
         print (to_unix_path(' '.join(libs)))