Recent Posts

Pages: 1 2 [3] 4 5 6 7 8 ... 10
21
Using Code::Blocks / Re: Debugger - Memory dump
« Last post by Evan on March 14, 2024, 08:50:26 pm »
Sorry, but I'm using Linux Mint.
22
Using Code::Blocks / Re: Debugger - Memory dump
« Last post by Pecan on March 14, 2024, 08:43:15 pm »
@evan

No, I mean the "CodeBlocks.exe -d "  option flag.
Or /d for windows. Run "codeblocks /?" for into.

My error. The debuggers log is there wether the -d options is used or not.
23
Using Code::Blocks / Re: Debugger - Memory dump
« Last post by Evan on March 14, 2024, 07:40:22 pm »
I assume you mean the -d option can be set as an argument in debugger default settings. If so, I can't see any address.

My debugger log:

Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: /home/evan/Desktop/C/DB/
Adding source dir: /home/evan/Desktop/C/DB/
Adding file: /home/evan/Desktop/C/DB/bin/Debug/DB
Changing directory to: /home/evan/Desktop/C/DB/.
Set variable: LD_LIBRARY_PATH=.:
Starting debugger: /usr/bin/gdb -nx -fullname -quiet -d -args /home/evan/Desktop/C/DB/bin/Debug/DB
Setting SHELL to '/bin/sh'
done
Setting breakpoints
Debugger name and version: GNU gdb (Debian 13.1-3) 13.1
Child process PID: 103102
24
Using Code::Blocks / Re: Debugger - Memory dump
« Last post by Pecan on March 14, 2024, 03:59:30 pm »
See if this works.
Try running CodeBlocks with the -d option to show the debuggers log. You can copy from the log by marking the address, right clicking, and selecting "copy selection".
25
Use the built-in Resource Monitor, see the second answer in this post for a guide.
26
The "No project/No target/Unknown compiler" message has no sense, and

That means the OP is not using an CB project.

Tim S.
27
Yes. It's not there (it disappears when I close the terminal window, as expected).

I also downloaded process explorer and tried to search for processes under that name, or any other meaningful name I could think of, cannot find anything .. I also searched on how to list all running processes via powershell and sort them by datetime for example (show most recent on top so i don't get lost), again I can see the process (name, pid, everything) when the terminal window is open, but when i close it there seems to be no process kept running that could somehow explain 'locking' test3.exe ...

28
Did you verify in the Windows task manger that test3.exe is not still running?

Tim S.
29
Thanks for your help. I am trying to provide what you requested.

I checked compiler -> settings -> other settings, compiler logging was already in 'full command line'.

I create a new file, test3.c. It contains a simple printout.

I compile the .c file first (simple compile, not build and run). In codeblocks build log i get:


Code
-------------- Build file: "no target" in "no project" (compiler: unknown)---------------

gcc.exe   -c C:\Users\thomas\test3.c -o C:\Users\thomas\test3.o
gcc.exe  -o C:\Users\thomas\test3.exe C:\Users\thomas\test3.o   
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))


Then I do build & run. Program executes succcessfully, a terminal window opens and I see the results of the printf.

Build log in codeblocks shows:


Code
-------------- Build file: "no target" in "no project" (compiler: unknown)---------------

gcc.exe   -c C:\Users\thomas\test3.c -o C:\Users\thomas\test3.o
gcc.exe  -o C:\Users\thomas\test3.exe C:\Users\thomas\test3.o   
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 
Checking for existence: C:\Users\thomas\test3.exe
Executing: '"C:\CodeBlocks/cb_console_runner.exe" "C:\Users\thomas\test3.exe"' (in 'C:\Users\thomas')
Set variable: PATH=C:\CodeBlocks\MinGW\bin;C:\CodeBlocks\MinGW;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\PuTTY;C:\Program Files (x86)\Calibre2;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\MinGW64\bin;C:\Program Files\dotnet;C:\Program Files\nodejs;C:\Program Files (x86)\dotnet;C:\Program Files\GitHub CLI;C:\Program Files\Git\cmd;C:\Users\thomas\AppData\Local\Programs\Python\Python311\Scripts;C:\Users\thomas\AppData\Local\Programs\Python\Python311;C:\Users\thomas\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Java\jdk1.8.0_191\bin;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3.2\bin;\;C:\Users\thomas\AppData\Local\Android\Sdk\platform-tools;C:\Users\thomas\AppData\Roaming\npm;C:\Program Files (x86)\Nmap;c:\Users\thomas\aliases

This is the terminal window:

Code
1111
Process returned 0 (0x0)   execution time : 1.822 s
Press any key to continue.

 (the only code inside the test3.c file is a
Code
printf("1111");


I close terminal window.

If I do another Build&Run (without changing anything in the code), I get the error. Build log shows:


Code
-------------- Build file: "no target" in "no project" (compiler: unknown)---------------

gcc.exe   -c C:\Users\thomas\test3.c -o C:\Users\thomas\test3.o
gcc.exe  -o C:\Users\thomas\test3.exe C:\Users\thomas\test3.o   
C:/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file C:\Users\thomas\test3.exe: Invalid argument
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))



Could it be that PATH shows two different entries for MINGW compiler, one ending at the /bin directory and one in the parent directory, or is that completely irrelevant?


30
Using Code::Blocks / Find functions called by or calling
« Last post by Evan on March 14, 2024, 10:38:34 am »
Find functions calling never shows the 'Find functions called by' or 'Find function calling'  results.

If connected in any way, search and replace works very well.

Thanks in advance
Pages: 1 2 [3] 4 5 6 7 8 ... 10