Skip to content

Wrong encoding causes pwndbg to crash #6

Open
@Corb3nik

Description

@Corb3nik

With a fresh installation of pwnvm :

  1. Run the /home/vagrant/tools/pwndbg/setup.sh script.
  2. Remove Voltron from ~/.gdbinit
  3. Open gdb

I obtain the following error message :

➜  ~ gdb
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
******
Your encoding (ISO-8859-1) is different than UTF-8. pwndbg might not work properly.
You might try launching gdb with:
    LC_ALL=en_US.UTF-8 PYTHONIOENCODING=UTF-8 gdb
Make sure that en_US.UTF-8 is activated in /etc/locale.gen and you called locale-gen
******
Traceback (most recent call last):
  File "/home/vagrant/tools/pwndbg/gdbinit.py", line 36, in <module>
    import pwndbg # isort:skip
  File "/home/vagrant/tools/pwndbg/pwndbg/__init__.py", line 15, in <module>

Running gdb with LC_ALL=en_US.UTF-8 PYTHONIOENCODING=UTF-8 gdb fixes the issue.

Is there a reason for using ISO-8859-1 instead of UTF-8 by default? If not, I'll suggest a fix in a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions