gdb.rb icon indicating copy to clipboard operation
gdb.rb copied to clipboard

UnicodeDecodeError: 'utf8' codec can't decode byte

Open antage opened this issue 15 years ago • 1 comments

I'm trying to debug rails-application (running with webrick). All works fine, but ruby objects strings issues error:

(gdb) ruby objects strings
Traceback (most recent call last):
  File "/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/gdb.rb-0.1.2/scripts/ruby-gdb.py", line 235, in invoke
    self.print_strings()
  File "/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/gdb.rb-0.1.2/scripts/ruby-gdb.py", line 288, in print_strings
    strings[ ptr.string() ] += 1
  File "/usr/lib/python2.5/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc3 in position 0: unexpected end of data
Error occurred in Python command.

antage avatar Dec 05 '09 02:12 antage

I pushed a hacky fix for this last night, http://github.com/tmm1/gdb.rb/commit/656573a57ad920a22681ff4877b9f1f0cebfe340, but am looking for a better way to actually fix it.

tmm1 avatar Dec 05 '09 02:12 tmm1