https://bugzilla.mozilla.org/show_bug.cgi?id=1286467 has landed, so if you have the following in your .gdbinit:
add-auto-load-safe-path ~/some/parent/dir/of/where/you/keep/gecko

You're now going to see stuff like the following for a hashtable with entries:

mRegistrationInfos = nsClassHashtable<nsCStringHashKey, 
mozilla::dom::workers::ServiceWorkerManager::RegistrationDataPerPrincipal> = {
    ["https://www.pokedex.org^userContextId=2";] = 
[(mozilla::dom::workers::ServiceWorkerManager::RegistrationDataPerPrincipal *) 
0x7f4a6a4a4c80],
    ["https://googlechrome.github.io";] = 
[(mozilla::dom::workers::ServiceWorkerManager::RegistrationDataPerPrincipal *) 
0x7f4a57ea0c80],
    ["https://jakearchibald.github.io";] = 
[(mozilla::dom::workers::ServiceWorkerManager::RegistrationDataPerPrincipal *) 
0x7f4a4f3f3100],
    ["https://offline-news-service-worker.herokuapp.com";] = 
[(mozilla::dom::workers::ServiceWorkerManager::RegistrationDataPerPrincipal *) 
0x7f4a4f7fef00]
  }


and for an empty hashtable:

mControlledDocuments = nsRefPtrHashtable<nsISupportsHashKey, 
mozilla::dom::workers::ServiceWorkerRegistrationInfo>,


Where you previously saw something like (this is without "set print pretty on"):

  mRegistrationInfos = {<nsBaseHashtable<nsCStringHashKey, 
nsAutoPtr<mozilla::dom::workers::ServiceWorkerManager::RegistrationDataPerPrincipal>, 
mozilla::dom::workers::ServiceWorkerManager::RegistrationDataPerPrincipal*>> = 
{<nsTHashtable<nsBaseHashtableET<nsCStringHashKey, 
nsAutoPtr<mozilla::dom::workers::ServiceWorkerManager::RegistrationDataPerPrincipal> > >> = {mTable = {
          mOps = 0x7fffecfe9e80 <nsTHashtable<nsBaseHashtableET<nsCStringHashKey, 
nsAutoPtr<mozilla::dom::workers::ServiceWorkerManager::RegistrationDataPerPrincipal> > 
>::Ops()::sOps>, mHashShift = 29, mEntrySize = 32, mEntryCount = 5, mRemovedCount = 0, 
mEntryStore = {
            mEntryStore = 0x7fffd51d6200 "", mGeneration = 1}, static 
kMaxCapacity = 67108864, static kMinCapacity = 8,
          static kMaxInitialLength = 33554432, static kDefaultInitialLength = 
4, static kHashBits = 32, static kGoldenRatio = 2654435769,
          static kCollisionFlag = 1}}, <No data fields>}, <No data fields>},


I mention this:
- Because if you're already using the pretty printers, the change might otherwise worry you if it's not immediately obvious what's going on. - As a reminder that you really want that "add-auto-load-safe-path PATH" in your .gdbinit because python-powered pretty printers are alliteratively awesome.


If you would like to help add pretty printers or make the existing pretty printers more awesome:

- The gecko ones live at:
https://dxr.mozilla.org/mozilla-central/source/python/gdbpp/gdbpp
And get into your gdb session via .gdbinit_python at either the root of the source tree or the root of your dist/bin tree:
https://dxr.mozilla.org/mozilla-central/source/.gdbinit_python
https://dxr.mozilla.org/mozilla-central/source/build/.gdbinit_python.in

- The SpiderMonkey ones (with tests!) live at:
https://dxr.mozilla.org/mozilla-central/source/js/src/gdb
And get into your gdb session on dynamic load of libxul:
https://dxr.mozilla.org/mozilla-central/source/toolkit/library/libxul.so-gdb.py.in

Andrew
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to