Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue34989

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:python-gdb.py fails with TypeError("'FakeRepr' object is not subscriptable") is gdb fails to read debug symbols
Type:Stage:resolved
Components:Demos and ToolsVersions:Python 3.8, Python 3.7, Python 3.6, Python 2.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: miss-islington, vstinner
Priority:normalKeywords:patch

Created on2018-10-15 11:11 byvstinner, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 9889mergedvstinner,2018-10-15 11:23
PR 9897mergedmiss-islington,2018-10-15 21:21
PR 9898mergedmiss-islington,2018-10-15 21:21
PR 9899mergedvstinner,2018-10-15 21:30
Messages (7)
msg327742 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2018-10-15 11:11
On Fedora 28, gdb fails to read (some?) debug symbols:"Dwarf Error: could not find partial DIE containing offset 0x316 [in module /usr/lib/debug/usr/bin/python3.6-3.6.6-1.fc28.x86_64.debug]"https://bugzilla.redhat.com/show_bug.cgi?id=1613614In this case, the "py-bt" command of python-gdb.py fails with a TypeError:(gdb) py-btTraceback (most recent call first):  <unknown at remote 0x7ffff7e5f7e0>Python Exception <class 'TypeError'> 'FakeRepr' object is not subscriptable: Error occurred in Python command: 'FakeRepr' object is not subscriptablepython-gdb.py shouldn't fail on such case, but handle the error.Attached PR fix this issue.
msg327744 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2018-10-15 11:26
The bug can be reproduced using this change:diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.pyindexbf4047419e..f973d4d4bd 100755--- a/Tools/gdb/libpython.py+++ b/Tools/gdb/libpython.py@@ -402,6 +402,7 @@ class PyObjectPtr(object):         the pointer accordingly.         '''         try:+            raise RuntimeError             p = PyObjectPtr(gdbval)             cls = cls.subclass_from_type(p.type())             return cls(gdbval, cast_to=cls.get_gdb_type())(Don't forget to run "make" again to copyTools/gdb/libpython.py to python-gdb.py.)
msg327788 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2018-10-15 21:20
New changeset2e438cc2554495b28480a3ffe5cdf41b6ab823a0 by Victor Stinner in branch 'master':bpo-34989: python-gdb.py: fix current_line_num() (GH-9889)https://github.com/python/cpython/commit/2e438cc2554495b28480a3ffe5cdf41b6ab823a0
msg327791 -(view)Author: miss-islington (miss-islington)Date: 2018-10-15 21:48
New changesetfcea3ddc4a7e756fa8f182789e886ccd3d524484 by Miss Islington (bot) in branch '3.7':bpo-34989: python-gdb.py: fix current_line_num() (GH-9889)https://github.com/python/cpython/commit/fcea3ddc4a7e756fa8f182789e886ccd3d524484
msg327792 -(view)Author: miss-islington (miss-islington)Date: 2018-10-15 21:50
New changeset71e601eb0857fb03c1dd3c349afb030ef84f95d0 by Miss Islington (bot) in branch '3.6':bpo-34989: python-gdb.py: fix current_line_num() (GH-9889)https://github.com/python/cpython/commit/71e601eb0857fb03c1dd3c349afb030ef84f95d0
msg327796 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2018-10-15 22:06
New changesetaadb44ee98bc73bc5132acea5848ac6aef1ff8c0 by Victor Stinner in branch '2.7':bpo-34989: python-gdb.py: fix current_line_num() (GH-9889) (GH-9899)https://github.com/python/cpython/commit/aadb44ee98bc73bc5132acea5848ac6aef1ff8c0
msg327818 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2018-10-16 10:38
Thanks Łukasz Langa for the review!
History
DateUserActionArgs
2022-04-11 14:59:07adminsetgithub: 79170
2022-01-04 19:15:34iritkatriellinkissue17951 superseder
2018-10-16 10:38:22vstinnersetstatus: open -> closed
resolution: fixed
messages: +msg327818

stage: patch review -> resolved
2018-10-15 22:06:34vstinnersetmessages: +msg327796
2018-10-15 21:50:45miss-islingtonsetmessages: +msg327792
2018-10-15 21:48:01miss-islingtonsetnosy: +miss-islington
messages: +msg327791
2018-10-15 21:30:07vstinnersetpull_requests: +pull_request9261
2018-10-15 21:21:58miss-islingtonsetpull_requests: +pull_request9260
2018-10-15 21:21:23miss-islingtonsetpull_requests: +pull_request9259
2018-10-15 21:20:01vstinnersetmessages: +msg327788
2018-10-15 11:26:28vstinnersetmessages: +msg327744
2018-10-15 11:23:29vstinnersetkeywords: +patch
stage: patch review
pull_requests: +pull_request9252
2018-10-15 11:11:42vstinnercreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp