gdb-pwndbg encoding issue

问题描述

为了更好的调试程序,下载编译了debug版的glibc-2.23。在配置环境后,打开gdb出现了如下的warning
******
Your encoding (ANSI_X3.4-1968) 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
******
pwndbg: loaded 164 commands. Type pwndbg [filter---Type <return> to continue, or q <return> to quit---q
Traceback (most recent call last):
  File "/home/pwd/pwndbg/gdbinit.py", line 36, in <module>
    import pwndbg # isort:skip
  File "/home/pwd/pwndbg/pwndbg/__init__.py", line 71, in <module>
    import pwndbg.prompt
  File "/home/pwd/pwndbg/pwndbg/prompt.py", line 24, in <module>
    print(message.prompt('pwndbg: ') + message.system(line))
  File "/usr/share/gdb/python/gdb/__init__.py", line 48, in write
    write(s, stream=STDOUT)
KeyboardInterrupt: Quit
(gdb) q

原因

新编译安装的glibc没有设置语言

解决方法

设置语言,
1.在安装目录下lib里,首先创建文件夹locale
2.在安装目录下bin里,执行./localedef -i en_US -f UTF-8 en_US.UTF-8
pwd@pwd-vm:~/installed/bin$ mkdir ../lib/locale/ 
pwd@pwd-vm:~/installed/bin$ ./localedef -i en_US -f UTF-8 en_US.UTF-8
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值