Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

GDB pretty printer - include files like CodeLite?

(1/2) > >>

AndrewCot:
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/

   

oBFusCATed:

--- Quote from: AndrewCot on August 11, 2021, 04:26:35 am ---Is it worth adding the GDB pretty printers like CodeLite does and include them in the C:B installer?

--- End quote ---
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.


--- Quote from: AndrewCot on August 11, 2021, 04:26:35 am ---Does anyone have any ideas on when the WIKI editing will become available again?

--- End quote ---
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.

AndrewCot:

--- Quote from: oBFusCATed on August 11, 2021, 10:19:33 am ---
--- Quote from: AndrewCot on August 11, 2021, 04:26:35 am ---Is it worth adding the GDB pretty printers like CodeLite does and include them in the C:B installer?

--- End quote ---
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.

--- End quote ---

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.

oBFusCATed:

--- Quote from: AndrewCot on August 11, 2021, 11:08:37 am ---Okay, so how do you make it easier for the end user to configure and setup the GDB pretty printers?

--- End 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.

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.

AndrewCot:

--- 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.

--- End quote ---
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.

--- End quote ---
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
--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version