Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gdb helpers script to help debugging #9086

Merged
merged 3 commits into from Sep 21, 2022

Conversation

cmcfarlen
Copy link
Contributor

This script adds a data command to gdb so you can print out HttpSM data. This is a sort-of proof of concept for writing helper commands to help dig into ATS data structures. We can add more if we like this approach. I thought about using pretty-printers but those might be problematic so I went the custom command route so it doesn't otherwise interfere with debugging.

This requires at least gdb 10

@cmcfarlen
Copy link
Contributor Author

(gdb) atspr sm this
smid = 229501
---- request ----
GET http://127.0.0.1/path/to/thing
Host: 127.0.0.1
Accept: text/plain, text/*, */*
Accept-Encoding: gzip
Connection: close
---- response ----
status: 403
Content-Type: text/plain
Cache-Control: no-cache
Content-Length: 0
Date: Mon, 12 Sep 2022 16:19:42 GMT
Age: 0
Connection: close
X-Cache: none
---- server_request  ----
GET :///path/to/thing
Host: 127.0.0.1
Accept: text/plain, text/*, */*
Accept-Encoding: gzip
Connection: close
X-Forwarded-For: 127.0.0.1
Connection: close
---- server_response  ----
status: 403
Content-Type: text/plain
Cache-Control: no-cache
Content-Length: 0
Date: Mon, 12 Sep 2022 16:19:42 GMT
---- transform_response  ----
invalid
---- cache_response  ----
invalid
---- client_info  ----
HTTP 1.1 (127.0.0.1 -> 127.0.0.1)
---- server_info  ----
HTTP 1.1 (127.0.0.1 -> 127.0.0.1)
---- parent_info  ----
HTTP 1.1 (127.0.0.1 -> 127.0.0.1)

bneradt
bneradt previously approved these changes Sep 12, 2022
Copy link
Contributor

@bneradt bneradt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks helpful. Thanks for starting this.

@cmcfarlen cmcfarlen added this to the 10-Dev milestone Sep 12, 2022
tools/gdb-helpers.py Outdated Show resolved Hide resolved
@vmamidi vmamidi merged commit 8352a76 into apache:master Sep 21, 2022
@cmcfarlen cmcfarlen deleted the gdb-pretty-printer branch September 21, 2022 20:53
@zwoop zwoop modified the milestones: 10-Dev, 10.0.0 Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants