Bug 1227348 - windows:mingw:win{32|64}/mingw{32|64}-gdb: TypeError: a bytes-like object is required, not 'str'
Summary: windows:mingw:win{32|64}/mingw{32|64}-gdb: TypeError: a bytes-like object is ...
Status: RESOLVED FIXED
Alias: None
Product: openSUSE.org
Classification: openSUSE
Component: 3rd party software (show other bugs)
Version: unspecified
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Ralf Habacker
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-03 14:29 UTC by Ralf Habacker
Modified: 2024-07-03 14:59 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2024-07-03 14:29:35 UTC
When running cross compiled gdb with a test program linked against libstdc++ and installed pretty printers the following error message appears:

Traceback (most recent call last):
  File "Z:\usr/i686-w64-mingw32/sys-root/mingw/share/gdb/python\gdb\__init__.py", line 148, in _execute_file
    compiled = compile(file.read().replace('\r\n','\n'), filepath, 'exec')
TypeError: a bytes-like object is required, not 'str'


How to reproduce:

1. on an openSUSE Leap host run 
  sudo zypper install mingw32-gdb mingw32-libstdc++-gdb-printer wine <your-test-program>

2.  run 
  wine /usr/i686-w64-mingw32/sys-root/mingw/bin/gdb.exe -ex "set auto-load safe-path /" <test-program>
(gdb) b main
(gdb) r