Re: [Kicad-developers] Help needed to configure gdb
KiCad loads symbols dynamically on runtime. So Gdb may not see them until KiCad starts running. Setting breakpoints works for me if I reply "y" to the "Make breakpoint pending on future shared library load? (y or [n])" prompt when the source file is not found. Gdb should also be able to find the source file if you set the breakpoint after running then interrupting KiCad. Best, Mikołaj On Wed, Jul 7, 2021 at 3:49 PM pradeepa.kck wrote: > Thanks Jon. I tried that and in that case gdb launched kicad, but it > couldn't find the source file to set a breakpoint. > > If someone can give me an example of setting the breakpoint that would be > great. I tried relative path and full path, but still couldn't set the > breakpoint in copper_zone_dialog.cpp. > > - Pradeepa > > Sent on the go with Vodafone > > > Original message > From: Jon Evans > Date: 7/7/21 11:28 pm (GMT+10:00) > To: Pradeepa Senanayake > Cc: KiCad Developers > Subject: Re: [Kicad-developers] Help needed to configure gdb > > gdb ./kicad/kicad is starting KiCad from the build directory. > > This isn't a fully-supported way of debugging KiCad, but if you want to do > this, you must set the environment variable > > KICAD_RUN_FROM_BUILD_DIR=1 > > Alternatively, since you are running `make install` above, you can use gdb > to debug KiCad at the installed location, rather than inside the build > directory. > > This will probably be a more reliable mechanism. > > -Jon > > On Wed, Jul 7, 2021 at 9:24 AM Pradeepa Senanayake > wrote: > >> Hello All, >> >> Sorry for the long mail. >> >> I'm trying to debug one of my changes using gdb and I've run into a >> roadblock. >> >> This is what I did so far, >> >> >> Built KiCAD using following commands >> >> cmake -DCMAKE_BUILD_TYPE=Debug >> -G "MSYS Makefiles" >> -DCMAKE_PREFIX_PATH=/mingw64 >>-DCMAKE_INSTALL_PREFIX=/mingw64 >>-DDEFAULT_INSTALL_PATH=/mingw64 >>-DOCC_INCLUDE_DIR=/mingw64/include/opencascade >>-DPYTHON_INCLUDE_DIR=/mingw64/include/python3.8 >>../../ >> make -j 4 install >> >> >> Started gdb using the following command >> >> $: gdb ./kicad/kicad >> >> ... >> ... >> Reading symbols from ./kicad/kicad.exe... >> (gdb) run >> Starting program: >> I:\msys64\home\Pradeepa\kicad-source\build\debug\kicad\kicad.exe >> [New Thread 16296.0x41b0] >> [New Thread 16296.0x3e0c] >> [New Thread 16296.0x2130] >> Python path configuration: >> PYTHONHOME = (not set) >> PYTHONPATH = (not set) >> program name = 'python3' >> isolated = 0 >> environment = 1 >> user site = 1 >> import site = 1 >> sys._base_executable = >> 'I:/msys64/home/Pradeepa/kicad-source/build/debug/kicad/kicad.exe' >> sys.base_prefix = 'D:/a/_temp/msys/msys64/mingw64' >> sys.base_exec_prefix = 'D:/a/_temp/msys/msys64/mingw64' >> sys.executable = >> 'I:/msys64/home/Pradeepa/kicad-source/build/debug/kicad/kicad.exe' >> sys.prefix = 'D:/a/_temp/msys/msys64/mingw64' >> sys.exec_prefix = 'D:/a/_temp/msys/msys64/mingw64' >> sys.path = [ >> 'D:/a/_temp/msys/msys64/mingw64/lib/python38.zip', >> 'D:/a/_temp/msys/msys64/mingw64/lib/python3.8', >> 'D:/a/_temp/msys/msys64/mingw64/lib/python3.8', >> 'D:/a/_temp/msys/msys64/mingw64/lib/lib-dynload', >> ] >> Could not find platform independent libraries >> Could not find platform dependent libraries >> Consider setting $PYTHONHOME to [:] >> Fatal Python error: init_fs_encoding: failed to get the Python codec of >> the filesystem encoding >> Python runtime state: core initialized >> ModuleNotFoundError: No module named 'encodings' >> >> Current thread 0x3154 (most recent call first): >> >> warning: Fatal Python error: >> warning: failed to get the Python codec of the filesystem encoding >> warning: >> [Thread 16296.0x3e0c exited with code 1] >> [Thread 16296.0x2130 exited with code 1] >> [Thread 16296.0x41b0 exited with code 1] >> [Inferior 1 (process 16296) exited with code 01] >> (gdb) >> >> I've set the PYTHONHOME to /mingw64 >> >> Now I can launch KiCad in gdb. However, it now gives many errors, >> >> Ex: can't open file >> I:\msys64\home\Pradeepa\kicad-source\build\debug\share\kicad\resources\images.tar.gz >> >> I feel that it's something to do with paths, however, it's hard to figure >> out without knowing how everything fits together. >> >> Can someone please give me a hand? >> >> Thanks! >> Best Regards, >> Pradeepa Senanayake. >> ___ >> Mailing list: https://launchpad.net/~kicad-developers >> Post to : kicad-developers@lists.launchpad.net >> Unsubscribe : https://launchpad.net/~kicad-developers >> More help : https://help.launchpad.net/ListHelp >> > ___ > Mailing list: https://launchpad.net/~kicad-developers > Post to : kicad-developers@lists.launchpad.net > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp >
Re: [Kicad-developers] Help needed to configure gdb
Thanks Jon. I tried that and in that case gdb launched kicad, but it couldn't find the source file to set a breakpoint. If someone can give me an example of setting the breakpoint that would be great. I tried relative path and full path, but still couldn't set the breakpoint in copper_zone_dialog.cpp.- Pradeepa Sent on the go with Vodafone Original message From: Jon Evans Date: 7/7/21 11:28 pm (GMT+10:00) To: Pradeepa Senanayake Cc: KiCad Developers Subject: Re: [Kicad-developers] Help needed to configure gdb gdb ./kicad/kicad is starting KiCad from the build directory.This isn't a fully-supported way of debugging KiCad, but if you want to do this, you must set the environment variableKICAD_RUN_FROM_BUILD_DIR=1Alternatively, since you are running `make install` above, you can use gdb to debug KiCad at the installed location, rather than inside the build directory.This will probably be a more reliable mechanism.-JonOn Wed, Jul 7, 2021 at 9:24 AM Pradeepa Senanayake wrote:Hello All,Sorry for the long mail.I'm trying to debug one of my changes using gdb and I've run into a roadblock.This is what I did so far,>> Built KiCAD using following commandscmake -DCMAKE_BUILD_TYPE=Debug -G "MSYS Makefiles" -DCMAKE_PREFIX_PATH=/mingw64 -DCMAKE_INSTALL_PREFIX=/mingw64 -DDEFAULT_INSTALL_PATH=/mingw64 -DOCC_INCLUDE_DIR=/mingw64/include/opencascade -DPYTHON_INCLUDE_DIR=/mingw64/include/python3.8 ../../make -j 4 install>> Started gdb using the following command$: gdb ./kicad/kicad..Reading symbols from ./kicad/kicad.exe...(gdb) runStarting program: I:\msys64\home\Pradeepa\kicad-source\build\debug\kicad\kicad.exe[New Thread 16296.0x41b0][New Thread 16296.0x3e0c][New Thread 16296.0x2130]Python path configuration: PYTHONHOME = (not set) PYTHONPATH = (not set) program name = 'python3' isolated = 0 environment = 1 user site = 1 import site = 1 sys._base_executable = 'I:/msys64/home/Pradeepa/kicad-source/build/debug/kicad/kicad.exe' sys.base_prefix = 'D:/a/_temp/msys/msys64/mingw64' sys.base_exec_prefix = 'D:/a/_temp/msys/msys64/mingw64' sys.executable = 'I:/msys64/home/Pradeepa/kicad-source/build/debug/kicad/kicad.exe' sys.prefix = 'D:/a/_temp/msys/msys64/mingw64' sys.exec_prefix = 'D:/a/_temp/msys/msys64/mingw64' sys.path = [ 'D:/a/_temp/msys/msys64/mingw64/lib/python38.zip', 'D:/a/_temp/msys/msys64/mingw64/lib/python3.8', 'D:/a/_temp/msys/msys64/mingw64/lib/python3.8', 'D:/a/_temp/msys/msys64/mingw64/lib/lib-dynload', ]Could not find platform independent libraries Could not find platform dependent libraries Consider setting $PYTHONHOME to [:]Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encodingPython runtime state: core initializedModuleNotFoundError: No module named 'encodings'Current thread 0x3154 (most recent call first):warning: Fatal Python error:warning: failed to get the Python codec of the filesystem encodingwarning:[Thread 16296.0x3e0c exited with code 1][Thread 16296.0x2130 exited with code 1][Thread 16296.0x41b0 exited with code 1][Inferior 1 (process 16296) exited with code 01](gdb)I've set the PYTHONHOME to /mingw64Now I can launch KiCad in gdb. However, it now gives many errors,Ex: can't open file I:\msys64\home\Pradeepa\kicad-source\build\debug\share\kicad\resources\images.tar.gzI feel that it's something to do with paths, however, it's hard to figure out without knowing how everything fits together.Can someone please give me a hand?Thanks!Best Regards,Pradeepa Senanayake. ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] Help needed to configure gdb
gdb ./kicad/kicad is starting KiCad from the build directory. This isn't a fully-supported way of debugging KiCad, but if you want to do this, you must set the environment variable KICAD_RUN_FROM_BUILD_DIR=1 Alternatively, since you are running `make install` above, you can use gdb to debug KiCad at the installed location, rather than inside the build directory. This will probably be a more reliable mechanism. -Jon On Wed, Jul 7, 2021 at 9:24 AM Pradeepa Senanayake wrote: > Hello All, > > Sorry for the long mail. > > I'm trying to debug one of my changes using gdb and I've run into a > roadblock. > > This is what I did so far, > > >> Built KiCAD using following commands > > cmake -DCMAKE_BUILD_TYPE=Debug > -G "MSYS Makefiles" > -DCMAKE_PREFIX_PATH=/mingw64 >-DCMAKE_INSTALL_PREFIX=/mingw64 >-DDEFAULT_INSTALL_PATH=/mingw64 >-DOCC_INCLUDE_DIR=/mingw64/include/opencascade >-DPYTHON_INCLUDE_DIR=/mingw64/include/python3.8 >../../ > make -j 4 install > > >> Started gdb using the following command > > $: gdb ./kicad/kicad > > ... > ... > Reading symbols from ./kicad/kicad.exe... > (gdb) run > Starting program: > I:\msys64\home\Pradeepa\kicad-source\build\debug\kicad\kicad.exe > [New Thread 16296.0x41b0] > [New Thread 16296.0x3e0c] > [New Thread 16296.0x2130] > Python path configuration: > PYTHONHOME = (not set) > PYTHONPATH = (not set) > program name = 'python3' > isolated = 0 > environment = 1 > user site = 1 > import site = 1 > sys._base_executable = > 'I:/msys64/home/Pradeepa/kicad-source/build/debug/kicad/kicad.exe' > sys.base_prefix = 'D:/a/_temp/msys/msys64/mingw64' > sys.base_exec_prefix = 'D:/a/_temp/msys/msys64/mingw64' > sys.executable = > 'I:/msys64/home/Pradeepa/kicad-source/build/debug/kicad/kicad.exe' > sys.prefix = 'D:/a/_temp/msys/msys64/mingw64' > sys.exec_prefix = 'D:/a/_temp/msys/msys64/mingw64' > sys.path = [ > 'D:/a/_temp/msys/msys64/mingw64/lib/python38.zip', > 'D:/a/_temp/msys/msys64/mingw64/lib/python3.8', > 'D:/a/_temp/msys/msys64/mingw64/lib/python3.8', > 'D:/a/_temp/msys/msys64/mingw64/lib/lib-dynload', > ] > Could not find platform independent libraries > Could not find platform dependent libraries > Consider setting $PYTHONHOME to [:] > Fatal Python error: init_fs_encoding: failed to get the Python codec of > the filesystem encoding > Python runtime state: core initialized > ModuleNotFoundError: No module named 'encodings' > > Current thread 0x3154 (most recent call first): > > warning: Fatal Python error: > warning: failed to get the Python codec of the filesystem encoding > warning: > [Thread 16296.0x3e0c exited with code 1] > [Thread 16296.0x2130 exited with code 1] > [Thread 16296.0x41b0 exited with code 1] > [Inferior 1 (process 16296) exited with code 01] > (gdb) > > I've set the PYTHONHOME to /mingw64 > > Now I can launch KiCad in gdb. However, it now gives many errors, > > Ex: can't open file > I:\msys64\home\Pradeepa\kicad-source\build\debug\share\kicad\resources\images.tar.gz > > I feel that it's something to do with paths, however, it's hard to figure > out without knowing how everything fits together. > > Can someone please give me a hand? > > Thanks! > Best Regards, > Pradeepa Senanayake. > ___ > Mailing list: https://launchpad.net/~kicad-developers > Post to : kicad-developers@lists.launchpad.net > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp > ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
[Kicad-developers] Help needed to configure gdb
Hello All, Sorry for the long mail. I'm trying to debug one of my changes using gdb and I've run into a roadblock. This is what I did so far, >> Built KiCAD using following commands cmake -DCMAKE_BUILD_TYPE=Debug -G "MSYS Makefiles" -DCMAKE_PREFIX_PATH=/mingw64 -DCMAKE_INSTALL_PREFIX=/mingw64 -DDEFAULT_INSTALL_PATH=/mingw64 -DOCC_INCLUDE_DIR=/mingw64/include/opencascade -DPYTHON_INCLUDE_DIR=/mingw64/include/python3.8 ../../ make -j 4 install >> Started gdb using the following command $: gdb ./kicad/kicad ... ... Reading symbols from ./kicad/kicad.exe... (gdb) run Starting program: I:\msys64\home\Pradeepa\kicad-source\build\debug\kicad\kicad.exe [New Thread 16296.0x41b0] [New Thread 16296.0x3e0c] [New Thread 16296.0x2130] Python path configuration: PYTHONHOME = (not set) PYTHONPATH = (not set) program name = 'python3' isolated = 0 environment = 1 user site = 1 import site = 1 sys._base_executable = 'I:/msys64/home/Pradeepa/kicad-source/build/debug/kicad/kicad.exe' sys.base_prefix = 'D:/a/_temp/msys/msys64/mingw64' sys.base_exec_prefix = 'D:/a/_temp/msys/msys64/mingw64' sys.executable = 'I:/msys64/home/Pradeepa/kicad-source/build/debug/kicad/kicad.exe' sys.prefix = 'D:/a/_temp/msys/msys64/mingw64' sys.exec_prefix = 'D:/a/_temp/msys/msys64/mingw64' sys.path = [ 'D:/a/_temp/msys/msys64/mingw64/lib/python38.zip', 'D:/a/_temp/msys/msys64/mingw64/lib/python3.8', 'D:/a/_temp/msys/msys64/mingw64/lib/python3.8', 'D:/a/_temp/msys/msys64/mingw64/lib/lib-dynload', ] Could not find platform independent libraries Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Python runtime state: core initialized ModuleNotFoundError: No module named 'encodings' Current thread 0x3154 (most recent call first): warning: Fatal Python error: warning: failed to get the Python codec of the filesystem encoding warning: [Thread 16296.0x3e0c exited with code 1] [Thread 16296.0x2130 exited with code 1] [Thread 16296.0x41b0 exited with code 1] [Inferior 1 (process 16296) exited with code 01] (gdb) I've set the PYTHONHOME to /mingw64 Now I can launch KiCad in gdb. However, it now gives many errors, Ex: can't open file I:\msys64\home\Pradeepa\kicad-source\build\debug\share\kicad\resources\images.tar.gz I feel that it's something to do with paths, however, it's hard to figure out without knowing how everything fits together. Can someone please give me a hand? Thanks! Best Regards, Pradeepa Senanayake. ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] For those wondering about KiCad version 5.99.0 in Debian unstable...
Hello Jon, Am 06.07.21 um 21:45 schrieb Jon Evans: > Hi Carsten, > > I was reminded of this thread because of this forum post: > https://forum.kicad.info/t/how-install-kicad-6-x-on-debian/30034/4 > > Is the fact that there is a 6.0.0 tag on experimental also related to > this issue with versioning? yes. But to be completely precise the tag isn't "6.0.0". It's "6.0.0~20210702.eff75b6+dfsg1-1". The important thing is the *tilde* sign that make this version less than 6.0.0. My mistake has some side effects. The package manager is only looking at versions, if a version of a package is greater than the installed version than it can be installed. To get current versions from the develop branch into experimental the version needs to be higher than the version in unstable/testing. Thus I decided to take the version schema 6.0.0~ to get the above requirement fulfilled. Debian Bulleseye is targeted to be released on 31th July. Means after this date the current version in unstable (that is in fact 5.1.10) will go into testing and can afterwards get into backports. -- Regards Carsten ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp