Author Topic: GDB pretty printer - include files like CodeLite?  (Read 3658 times)

Offline AndrewCot

  • Almost regular
  • **
  • Posts: 236
GDB pretty printer - include files like CodeLite?
« on: August 11, 2021, 04:26:35 am »
CodeLite includes a few GDB pretty printer files, but Code:Blocks does not include any and IMHO the wiki pages regarding adding them to GDB using C::B needs some updates to make them easier to understand and follow.  IMHO the corresponding Codelite wiki page is easier to understand and follow. The biggest issue I found was trying to find the wxwidget pretty printer python file to ensure I hopefully had the latest version.

Is it worth adding the GDB pretty printers like CodeLite does and include them in the C:B installer?
The next stage would be to upgrade the C::B manual and WIKI pages to reference the pretty printer files. Does anyone have any ideas on when the WIKI editing will become available again?

The relevant CodeLite URL's are:
    https://github.com/eranif/codelite/tree/master/Runtime/gdb_printers
    https://wiki.codelite.org/pmwiki.php/Main/GdbPrettyPrinting
    https://docs.codelite.org/debuggers/gdb/

   

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13438
    • Travis build status
Re: GDB pretty printer - include files like CodeLite?
« Reply #1 on: August 11, 2021, 10:19:33 am »
Is it worth adding the GDB pretty printers like CodeLite does and include them in the C:B installer?
IMO: Nope, these files shouldn't be part of the installation because they would get outdated. We cannot ship every given library or helper file in the world, for every version.

Does anyone have any ideas on when the WIKI editing will become available again?
Unfortunately the answer here is nope again and it is not the case that I'm not asking the same question for some time already.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline AndrewCot

  • Almost regular
  • **
  • Posts: 236
Re: GDB pretty printer - include files like CodeLite?
« Reply #2 on: August 11, 2021, 11:08:37 am »
Is it worth adding the GDB pretty printers like CodeLite does and include them in the C:B installer?
IMO: Nope, these files shouldn't be part of the installation because they would get outdated. We cannot ship every given library or helper file in the world, for every version.

Okay, so how do you make it easier for the end user to configure and setup the GDB pretty printers?

This is hypothetical in that I have no idea if the GDB pretty printer files included in CodeLite are available on the internet from an official site/page/url, but if they are I could add another page in the installer to download the files and open a page on the internet that has instructions on it for the end user to follow. Another option is to add another option on the installer's compiler  download page to open the page that has the instructions on it.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13438
    • Travis build status
Re: GDB pretty printer - include files like CodeLite?
« Reply #3 on: August 11, 2021, 02:59:37 pm »
Okay, so how do you make it easier for the end user to configure and setup the GDB pretty printers?
On linux the build of a particular library should be embedding a section which specifies how gdb should auto-load its printers. No idea if there is the same feature for windows, but this is the only newbie friendly solution.

p.s. Try the stl printers with something like a map<string, vector<string>> and you'll soon stop bothering with printers in C::B.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline AndrewCot

  • Almost regular
  • **
  • Posts: 236
Re: GDB pretty printer - include files like CodeLite?
« Reply #4 on: August 12, 2021, 01:50:42 am »
Quote
On linux the build of a particular library should be embedding a section which specifies how gdb should auto-load its printers. No idea if there is the same feature for windows, but this is the only newbie friendly solution.
I have not been able to find info on this. Can you please point me where I can find info on this. I may not be using the correct search words in google.

Quote
p.s. Try the stl printers with something like a map<string, vector<string>> and you'll soon stop bothering with printers in C::B.
On Windows this works because the GDB is shipped with a gdbinit that is configured to support C++.  The following is the the MINGW32 gdbinit showing the C++ pretty printer support:
Code
python
import sys
sys.path.insert(0, sys.path[0] + '/../../gcc-8.1.0/python')
from libstdcxx.v6.printers import register_libstdcxx_printers
register_libstdcxx_printers (None)
end

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13438
    • Travis build status
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]