[SERVER-74240] Add gdb CodeFragment pretty printing of stackSize and fixups Created: 21/Feb/23 Updated: 01/Mar/23 Resolved: 01/Mar/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Kevin Cherkauer | Assignee: | Kevin Cherkauer |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Execution
|
| Sprint: | QE 2023-03-06 |
| Participants: |
| Description |
|
This is split out of
Q: Where is the Python pretty printer? A: Irina Yatsenko: buildscripts/gdb/mongo_printers.py SbeCodeFragmentPrinter [Originally added by [It is a plugin for the GDB debugger.] the pretty printers should be loaded automatically if you are running GDB from the toolchain. however, after the recent toolchain updates there have been issues with pretty printers (not sure exactly about the extent of problems) you'd need to attach GDB to mongod and get it to breakpoint in code that has a CodeFragment object sitting around. Then you do either "p obj_name" or "p *obj_name" depending on whether 'obj_name' is a value or a pointer it should printout a nicely formatted sequence of opcodes from the recent communications flying around, you might need to compile with GDB_INDEX=1 (add it to the scone's command line) to get any decent debugging experience in GDB. it does make the compile/link time longer, though, so you might not want to keep the setting permanently...
|
| Comments |
| Comment by Kevin Cherkauer [ 01/Mar/23 ] | ||
|
The external Python pretty printer has not been maintained and is broken in current master, so irina.yatsenko@mongodb.com, its creator, who moved to QI, was probably its only user. anna.wawrzyniak@mongodb.com, who opened the original ticket this was added to and then split off from later ( The C++ pretty printer I already enhanced in
and is also used by tests, so it is kept in sync. There is no business case for maintaining a second external pretty printer, so I am closing this as "Won't Do." | ||
| Comment by Kevin Cherkauer [ 23/Feb/23 ] | ||
|
david.storch@mongodb.com I split this out of existing already scheduled ticket The original ticket seemed to add the gdb pretty pritner as an afterthought, and it is a Python tool external to the server codebase, so I thought it is better to do it as a separate ticket rather than hold the original ticket open after the C++ pretty printer is delivered. | ||
| Comment by David Storch [ 23/Feb/23 ] | ||
|
kevin.cherkauer@mongodb.com is it incorrect that this ticket is in "Needs Scheduling" state? It looks like it's assigned to you and slotted into the current QE sprint. |