Closed Bug 1283768 Opened 9 years ago Closed 9 years ago

add a gdb helper to dereference smart pointers

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox50 affected)

RESOLVED FIXED
Tracking Status
firefox50 --- affected

People

(Reporter: wcpan, Unassigned)

Details

Attachments

(1 file)

I know this is trivial, but I really use this very often.
(In reply to Wei-Cheng Pan [:wcpan] [:wcp] [:legnaleurc] from comment #0) > I know this is trivial, but I really use this very often. in unoptimized builds I think *somePtr and somePtr->mFoo should just work (at least they do for me so if they don't for you I'm curious why). That said we should probably consider using https://sourceware.org/gdb/current/onlinedocs/gdb/Xmethods-In-Python.html#Xmethods-In-Python so people don't need to remember different commands.
Comment on attachment 8767080 [details] Bug 1283768 - Add a gdb helper to dereference smart pointers. I agree with Trevor, we shouldn't add new commands. (And in fact, we should probably remove the existing commands in .gdbinit now that we have pretty printers).
Attachment #8767080 - Flags: review?(mh+mozilla)
(In reply to Trevor Saunders (:tbsaunde) from comment #2) > in unoptimized builds I think *somePtr and somePtr->mFoo should just work > (at least they do for me so if they don't for you I'm curious why). That > said we should probably consider using > https://sourceware.org/gdb/current/onlinedocs/gdb/Xmethods-In-Python. > html#Xmethods-In-Python so people don't need to remember different commands. I experienced some builds that can not follow operator-> properly, but I can't reproduce now. (In reply to Mike Hommey [:glandium] from comment #3) > Comment on attachment 8767080 [details] > Bug 1283768 - Add a gdb helper to dereference smart pointers. > > I agree with Trevor, we shouldn't add new commands. (And in fact, we should > probably remove the existing commands in .gdbinit now that we have pretty > printers). Good idea.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
(In reply to Wei-Cheng Pan [:wcpan] [:wcp] [:legnaleurc] from comment #4) > (In reply to Trevor Saunders (:tbsaunde) from comment #2) > > in unoptimized builds I think *somePtr and somePtr->mFoo should just work > > (at least they do for me so if they don't for you I'm curious why). That > > said we should probably consider using > > https://sourceware.org/gdb/current/onlinedocs/gdb/Xmethods-In-Python. > > html#Xmethods-In-Python so people don't need to remember different commands. > > I experienced some builds that can not follow operator-> properly, but I > can't reproduce now. I expect it will happen in a optimized build because operator -> gets inlined, but the Xmethod thing should fix that.
Resolution: WONTFIX → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: