Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-04

Can not run in debug mode for WinCe

18 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

GREP

Hi
I have tried (and read) all I could till now, but I haven't succeded Please, help.
The app builds fine and runs fine in the WM 6.1 emulator. But I cannot run it from Lazarus.
These are my project options

<http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030869/debug1.gif>

<http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030869/debug2.gif>

Note: I cannot use
<http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030869/debug0.gif> as suggestee on a online help, because I get this error when I build

    ifpos.lpr(0,0) Fatal: Can not find unit lnfodwrf used by ifpos.

This is what I have in Tools-> Options->Debugger

<http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030869/debug3.gif> and I have the gdb on my D:drive
<http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030869/debug4.gif>

When i Clean and build the app and run it form the Lazarus IDE I get these erroors in the View->Debugger output:

~"Connectig to remote device...\n"
&"error opening file \"\\gdb\\wince-stub.exe\". Windows error 32.\n" ^error,msg="error opening file \"\\gdb\\wince-stub.exe\". Windows error ........
~"The program being debugged is not being run.\n"
.......
&"Undefined info command: \"pid\". Try \"help info\".\n"

View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Can-not-run-in-debug-mode-for-WinCe-tp4030869.html Sent from the Free Pascal - Lazarus mailing list .

Reply by email

Sven Barth
to GREP: Hi I have tried (and read) all I could till now, but I haven't succeded Please, help. The…
GREP wrote 16 lines
Hi I have tried (and read) all I could till now, but I haven't succeded Please, help. The app builds fine and runs fine in the WM 6.1 emulator. But I cannot run it from Lazarus. These are my project options <http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030869/debug1.gif> <http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030869/debug2.gif> Note: I cannot use <http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030869/debug0.gif> as suggestee on a online help, because I get this error when I build ifpos.lpr(0,0) Fatal: Can not find unit lnfodwrf used by ifpos. This is what I have in Tools-> Options->Debugger

For WinCE we only support Stabs as debug format, so the error is correc

Show quoted text 14 lines
<http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030869/debug3.gif> and I have the gdb on my D:drive <http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030869/debug4.gif> When i Clean and build the app and run it form the Lazarus IDE I get these erroors in the View->Debugger output: ~"Connectig to remote device...\n" &"error opening file \"\\gdb\\wince-stub.exe\". Windows error 32.\n" ^error,msg="error opening file \"\\gdb\\wince-stub.exe\". Windows error ........ ~"The program being debugged is not being run.\n" ....... &"Undefined info command: \"pid\". Try \"help info\".\n"

Did you copy the wince-stub.exe (should be located in the same directory as gdb.exe) file to the directory "\gdb\" on the device?

Regards,
Sven

Reply by email

Zaher Dirkey
to GREP: Hi I have tried (and read) all I could till now, but I haven't succeded Please, help. The…

Mayne there is similar problem in message list, was solved by setting Debug Info to "Auto", and all packages to "Auto", try it.

GREP wrote 48 lines
Hi I have tried (and read) all I could till now, but I haven't succeded Please, help. The app builds fine and runs fine in the WM 6.1 emulator. But I cannot run it from Lazarus. These are my project options <http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030869/debug1.gif> <http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030869/debug2.gif> Note: I cannot use <http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030869/debug0.gif> as suggestee on a online help, because I get this error when I build ifpos.lpr(0,0) Fatal: Can not find unit lnfodwrf used by ifpos. This is what I have in Tools-> Options->Debugger <http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030869/debug3.gif> and I have the gdb on my D:drive <http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030869/debug4.gif> When i Clean and build the app and run it form the Lazarus IDE I get these erroors in the View->Debugger output: ~"Connectig to remote device...\n" &"error opening file \"\\gdb\\wince-stub.exe\". Windows error 32.\n" ^error,msg="error opening file \"\\gdb\\wince-stub.exe\". Windows error ........ ~"The program being debugged is not being run.\n" ....... &"Undefined info command: \"pid\". Try \"help info\".\n" -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Can-not-run-in-debug-mode-for-WinCe-tp4030869.html Sent from the Free Pascal - Lazarus mailing list . -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130421/22afcebd/attachment.html>

Reply by email

GREP
to Felipe Monteiro de Carvalho

Thanks very much.
I kind of duplicate the post b/c this first behaviour seemed 'solved' since here it would not even communicate with the WM emulator,then after afew things that I did,
it get past that and I thought it was then a different problem. After reading your wicki it appears to be the same problem. However what is this:
You can change the remote directory from /gdb to yours by add gdb parameter --eval-command="set remotedirectory ...

*--eval-command="set remotedirectory \Storage Card\Program Files\My Program\bin"*

Were do I put that line? From inside the IDE how do I use it? where do I find "gdb prameters"
Thanks again

View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Can-not-run-in-debug-mode-for-WinCe-tp4030869p4030928.html Sent from the Free Pascal - Lazarus mailing list .

Reply by email

Felipe Monteiro de Carvalho
to GREP
GREP wrote
Were do I put that line? From inside the IDE how do I use it? where do I find "gdb prameters"

This part is in the "some hints" section, so it is not necessary, just an extra hint to change the debug directory. When working on this lately I did not use this step at all, I didn't put that line anywhere and it worked fine for me. I just used the default debug directory.

Felipe Monteiro de Carvalho

Reply by email

GREP
to Felipe Monteiro de Carvalho

Sorry, what is the default debug directory?
If i put D:\lazarus\mingw\bin\gdb.exe, then when I run the app it tellsme is not
a valid executable.
If i try to leave the Debugger Path blank in Tools -> option-> degugger, it dos not letme.
How do I set the debuger directory to default?
Also, I have tried to put the debugger directory to d:\gdb, and left the Shared folder as D:\emulator on WM 6. It stills creates a directory gdb in WM and runs out of memory. How can I force lazarus to copy the since-stub and app.exe do D:\emulator rather then d:\gdb?
Also if the "some hints" sectionmay help, how do I find it? is it in Project Options? in Tools? where?
Thanks

View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Can-not-run-in-debug-mode-for-WinCe-tp4030869p4030936.html Sent from the Free Pascal - Lazarus mailing list .

Reply by email

GREP
to Felipe Monteiro de Carvalho: This part is in the "some hints" section, so it is not necessary, just an extra hint to…

Sorry
I guess I should have said:
How can we FORCE Lacarus to Upload wince-stub and app.exe to the STORAGE CARD of the device instead of creating a folder in the device (gdb)?

~"Uploading file to device: \\gdb\\wince-stub.exe\n" ~"Starting on device: \"\\gdb\\wince-stub.exe \"\n" ~"Accepting connection...\n"
~"Uploading file to device: \\gdb\\pos.exe\n"

View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Can-not-run-in-debug-mode-for-WinCe-tp4030869p4030937.html Sent from the Free Pascal - Lazarus mailing list .

Reply by email

Felipe Monteiro de Carvalho
to GREP: Sorry, what is the default debug directory? If i put D:\lazarus\mingw\bin\gdb.exe, then…
GREP wrote
Sorry, what is the default debug directory?

It is written in the wiki, the default debug directory is \gdb as written here:

Step 4 - Optional - This step is optional and if you don't do it, gdb will do this for you, but it might take some 5 minutes to do it. Copy your executable file with File Explorer program in your emulator to the directory "\gdb". If there is no gdb directory in the root folder, create it.

If i put D:\lazarus\mingw\bin\gdb.exe, then when I run the app it tellsme is not a valid executable.

Are you following the wiki instructions precisely? D:\lazarus\mingw\bin\gdb.exe is a win32 desktop debugger. It is not a wince cross-debugger. This should be fixed in step 1 of the instructions:

Step 1 - In Lazarus IDE go to the menu Environment->Debugger Options. Change the debugger path to the directory with gdb for wince.you can get it from here
ftp://ftp.freepascal.org/pub/fpc/contrib/cross/gdb-6.4-win32-arm-wince.zip

I recommend that you follow the step-by-step instructions in the wiki. Follow precisely all steps. First step 1, then step 2, and so on.

Felipe Monteiro de Carvalho

Reply by email

GREP
to Felipe Monteiro de Carvalho

Felipe
Thans for your answers.
I did follow the steps (the "D:\lazarus\mingw\bin\gdb.exe" was a desperate attempt after nothing worked).
The point is that even when I set D:\gdb\gdb.exe as the debugger path in Tools->Options, and set the shared folder in WM6 to d:\gdb, Lazarus
copies the wince-stub and app.exe to a *root directory in the DEVICE* "gdb', *not in the storage card* like the Lazarus 0.9.... I had did. The problem is that WM emulator runs out of *STORAGE* memory, not RAM (which is set to 128).
Will this never be reverted to the way lazarus 0.9 worked (i.e. copy to the shared folder)?
I tried the work around suggested in this link:
"Also read the notes on http://bugs.freepascal.org/view.php?id=21061 for information on additional setup. ". Although in 2012 it appeared that the problem
was solved I stiil get it.
I have
<http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030945/debug2.gif> and

<http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030945/debug4.gif>

When I run the app in the debugger output i see:
<info line "D:\hd\unit101.pas":167>
&"info line \"D:\\hd\\unit101.pas\":167\n"
&"No source file named D:\\hd\\unit101.pas.\n"
and when the execution gets to the break point
I get:
<http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030945/debug1.gif> While of course I do have it:
<http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030945/debug3.gif> Is there *another work around?*

View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Can-not-run-in-debug-mode-for-WinCe-tp4030869p4030945.html Sent from the Free Pascal - Lazarus mailing list .

Reply by email

Sven Barth
to GREP
GREP wrote 9 lines
Felipe Thans for your answers. I did follow the steps (the "D:\lazarus\mingw\bin\gdb.exe" was a desperate attempt after nothing worked). The point is that even when I set D:\gdb\gdb.exe as the debugger path in Tools->Options, and set the shared folder in WM6 to d:\gdb, Lazarus copies the wince-stub and app.exe to a *root directory in the DEVICE* "gdb', *not in the storage card* like the Lazarus 0.9.... I had did.

1. GDB by default assumes that your application will be located at "\gdb" on the device/emulator. This was never handled by Lazarus in any way.

2. To change the directory you need to follow what is mentioned below "Some hints" on the wiki page linked by Felipe. You need to add the following

--eval-command="set remotedirectory \Storage Card\Program Files\My Program\bin"

(or whatever your directory is called ON THE DEVICE)

to Environment => Options => Debugger => Debugger_Startup_Options (maybe with only one "-" at the front instead of two)

You might also need to restart GDB for this to work. You can do this by using Start => Reset Debugger

Regards,
Sven

Reply by email

GREP
to Sven Barth

Thanks very much Sven

the eval-command worked, I have no more problems of storage memory. ( I do not remenber this in my previous Lazarus installation, but it is almost 2 years that I did not use it)
However, when I ran the app (frrm Lazarus) I got

<http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030949/debug5.gif>

I inspected the code.
The project file and all my unit files are in d:\hd

I have this options

<http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030949/debug1.gif> (I got same results with Automatic)

and this in the object insoector
<http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030949/debug2.gif>

and I do have unit101.pas in the Procject uses clause. When I clicked the line to mark the break-point
it put a quesitonmark on its left
<http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030949/debug3.gif>

and the View-Breakopints Window shows:

<http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030949/debug4.gif>

and the debugger output says:

<info line "D:\hd\unit101.pas":162>
&"info line \"D:\\hd\\unit101.pas\":162\n"
&"No source file named D:\\hd\\unit101.pas.\n"

Do you know why it sys so when I do have
Directorio de D:\hd

18/04/2013 05:57 AM 5,284 unit101.pas

View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Can-not-run-in-debug-mode-for-WinCe-tp4030869p4030949.html Sent from the Free Pascal - Lazarus mailing list .

Reply by email

GREP
to GREP

Hello
I did everything i found in the wicki, still the app does not let me insert breakpoints (the lines show a "?"). It builds fine but when I run it, it says it cannot find the file with the break point.
I have shown the options in my previous posts.
I do not know what to do anymore.
Should I perhaps rebuilt Lazarus and change some options in this window?
<http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030990/debug1.gif>

View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Can-not-run-in-debug-mode-for-WinCe-tp4030869p4030990.html Sent from the Free Pascal - Lazarus mailing list .

Reply by email

Sven Barth
to GREP: Thanks very much Sven the eval-command worked, I have no more problems of storage memory.…
GREP wrote 9 lines
Thanks very much Sven the eval-command worked, I have no more problems of storage memory. ( I do not remenber this in my previous Lazarus installation, but it is almost 2 years that I did not use it) However, when I ran the app (frrm Lazarus) I got <http://free-pascal-lazarus.989080.n3.nabble.com/file/n4030949/debug5.gif>

This is a bug in (possibly) GDB. A workaround is mentioned here (and also linked from the wiki page):
http://bugs.freepascal.org/view.php?id=21061#c55704

In short: Add "D:\" to the "Other source directory" paths.

Regards,
Sven

Reply by email

GREP
to Sven Barth

I ran this same project with Lazrus 0.0... for about a year. The gdb was the same.
The problem is clearly with some settings/options in Lazarus. There are *NO BLUE DOTS* in the compiledsource.The break points show a question mark.
I have the D:\ in Other source.
That workaround does not work here.

View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Can-not-run-in-debug-mode-for-WinCe-tp4030869p4031021.html Sent from the Free Pascal - Lazarus mailing list .

Reply by email

Martin
to GREP
GREP wrote 8 lines
I ran this same project with Lazrus 0.0... for about a year. The gdb was the same. The problem is clearly with some settings/options in Lazarus. There are *NO BLUE DOTS* in the compiledsource.The break points show a question mark. I have the D:\ in Other source. That workaround does not work here.

I don't use WinCE myself, so I can only be of limited help here. (I do know the debugger stuff)

Please generate and provide a log:
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session

In the debugger options is a property grid. One entry is InternalStartBreak. Please try, if changing this makes a difference. (try entry or main)

Reply by email

Felipe Monteiro de Carvalho
to Martin

Are you debugging with the emulator or a real device?

For me I used the emulator and followed the wiki instructions and it all just worked. So maybe you should try the emulator if possible for your project.

Felipe Monteiro de Carvalho

Reply by email