When I debug with the integrated IDE + C backend, where is the amalgamated purebasic.c file?
Any errors that popup refer to line numbers in that file.
Using the command line compiler does not reproduce the same file due to cross platform limitations.
Ex. icons, resource file, etc.
C:\> c:\purebasic-x64\Compilers\pbcompilerc.exe -c -t "c:\dev\myapp.pb"
[v6b6CBE] Where is purebasic.c stored during debug?
[v6b6CBE] Where is purebasic.c stored during debug?
Last edited by skywalk on Wed Apr 20, 2022 7:43 pm, edited 1 time in total.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: [v6b4CBE] Where is purebasic.c stored during debug?
When compiling, PB creates a folder called PureBasic (followed by a bunch of numbers) in your %temp% directory where all the project files reside, but deletes it immediately afterwards... You have to get creative if you want to intercept these files
Et cetera is my worst enemy
Re: [v6b4CBE] Where is purebasic.c stored during debug?
Use my command line tool alter it to print the current directory. With the message requester. Pb creates a temporary folder in your user's temp directory. But you need to interrupt the compilation to see it.
https://www.purebasic.fr/english/viewtopic.php?t=78558
https://www.purebasic.fr/english/viewtopic.php?t=78558
Re: [v6b6CBE] Where is purebasic.c stored during debug?
Ok,
I have another cryptic PB CBE compiler error that references purebasic.c.
I was able to copy C:\Users\me\AppData\Local\Temp\SomeRandomFolder\purebasic.c before it gets deleted.
But I am not clear how to fix the error since this code works with ASM BE(backend).
I have another cryptic PB CBE compiler error that references purebasic.c.
I was able to copy C:\Users\me\AppData\Local\Temp\SomeRandomFolder\purebasic.c before it gets deleted.
But I am not clear how to fix the error since this code works with ASM BE(backend).
Code: Select all
---------------------------
PureBasic - Assembler error
---------------------------
error: 'rr4318' undeclared (first use in this function); did you mean 'rr4319'?
SYS_ReAllocateArray((v_nf+1),&(*rr4318).f_f);
^~~~~~
rr4319
purebasic.c:23700:33: note: each undeclared identifier is reported only once for each function it appears in
purebasic.c:23701:87: warning: passing argument 2 of 'PB_GetMapElement' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
s_offsets* rr4321=(s_offsets*)PB_GetMapElement(m_mapcal.a,v_rfpdS);
...
~~~~~~~~^~~~~~
---------------------------
OK
---------------------------
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
-
- Enthusiast
- Posts: 544
- Joined: Wed Sep 25, 2019 10:18 am
Re: [v6b6CBE] Where is purebasic.c stored during debug?
Could you please use the command line version with --commented and find out in the C code why rr4318 does not exist and raise a ticket at Bugs - C backend.
Please ask your questions, because switch on the cognition apparatus decides on the only known life in the universe.Wersten :DDüsseldorf NRW Germany Europe Earth Solar System Flake Bubble Orionarm
Milky Way Local_Group Virgo Supercluster Laniakea Universe
Milky Way Local_Group Virgo Supercluster Laniakea Universe
Re: [v6b6CBE] Where is purebasic.c stored during debug?
I already mentioned the command line does not create the same purebasic.c file?
It really is simpler to not delete it in the 1st place.
Purebasic.c is a critical file given our errors reference unique variables and line numbers within it.
It really is simpler to not delete it in the 1st place.
Purebasic.c is a critical file given our errors reference unique variables and line numbers within it.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: [v6b6CBE] Where is purebasic.c stored during debug?
What are your compiler options Are you asking it to optimize the code that can cause problems. Are you using array within a map structure. There has been issues with compound structures in prior betas and is that really your variable name rr4138 that strikes me to be a code generated name.
Re: [v6b6CBE] Where is purebasic.c stored during debug?
Yes, rr4138 is autogenerated by PB.
I tried with and without optimizer.
Yes, I have maps holding arrays.
I have an icon and resident file and threaded options. No matter, I cannot match IDE vs cmd line.
I tried with and without optimizer.
Yes, I have maps holding arrays.
I have an icon and resident file and threaded options. No matter, I cannot match IDE vs cmd line.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: [v6b6CBE] Where is purebasic.c stored during debug?
Try to expand the lookups and sets through intermediate variables and see if that works.
or show us the structure and how it's being addressed in the function so we can try to replicate the bug.
or show us the structure and how it's being addressed in the function so we can try to replicate the bug.
Re: [v6b6CBE] Where is purebasic.c stored during debug?
Yes, I think user Russian already reproduced the error in my other post.
The point of this topic is to ease debug of C backend errors that point to purebasic.c.
The error dialog text can be copied to clipboard on windows 10, but it is easier if in a log.
The point of this topic is to ease debug of C backend errors that point to purebasic.c.
The error dialog text can be copied to clipboard on windows 10, but it is easier if in a log.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum