Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

fix: handle negative line number deltas #73

Merged
merged 5 commits into from
Feb 17, 2023

Conversation

mctavish
Copy link
Contributor

@mctavish mctavish commented Feb 16, 2023

In Python 3.6-3.9, unlike in Python 2, co_lnotab's line number offsets can be negative and are represented by a signed integer. The Debugger agent had been using an unsigned integer which prevented it from being able to set breakpoints on lines of code in a code object after the line table had a negative offset.

This PR also enables most of the previously disabled tests now that they work on all supported versions of Python. A couple still remain disabled and will be fixed later on.

@mctavish mctavish requested a review from jasonborg February 16, 2023 20:55
@mctavish mctavish marked this pull request as ready for review February 16, 2023 20:55
src/googleclouddebugger/module_explorer.py Show resolved Hide resolved
src/googleclouddebugger/python_util.cc Outdated Show resolved Hide resolved
@mctavish mctavish merged commit 3d3e066 into GoogleCloudPlatform:main Feb 17, 2023
@mctavish mctavish deleted the lnotab-fix branch February 17, 2023 14:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants