Notice

The forum is in read only mode.

  • Page:
  • 1
  • 2

TOPIC: Symbols not found with remote debugging

Symbols not found with remote debugging 7 years 3 months ago #2067

If I rebuild the app for 64-bit Windows, and deploy it to a Windows 7 x64 sp1, with exactly the same PAserver configuration, then breakpoints work.

So there seems to be some problem in remote debugging of a Windows-32 app on a remote Windows-32 host from a Windows-64 host. Is this a know problem?

Symbols not found with remote debugging 7 years 2 months ago #2096

Hi Mats,

Can you try the following steps and let us know if you can hit the breakpoint?

a. Create a simple C++ console app, add line breakpoint
b. Create remote connection profile to the remote machine
c. Set Target platform to win32, and assign remote connection profile
d. Launch PAServer on the remote machine
e. Press F9
Expected: app to be deployed to remote machine, debug session started, and line breakpoint is hit.


f. Now, terminate the app
g. Shutdown the IDE
h. Launch IDE again
i. Open the project created in step a) above
j. Set line breakpoint (like step a) above)
k. Run | Load Process | Remote
Remote path: <projectname>\<projectname>.exe e.g Project1\Project1.exe
Remote host: click on … button, and select remote profile created in step b) above
After load: select run
l. Press Load button
Expected: process is launched remotely, and line breakpoint is hit



m. Open the project where debug symbol is not loaded, set target platform to win32, and set connection profile
n. Set line breakpoint, and F9, do the symbols get loaded and the breakpoint is hit?

Symbols not found with remote debugging 7 years 2 months ago #2104

Hi,

Thanks for looking at this

Host: Win7 Ultimate x64 runing RAD Studio XE6 upd1
Targ: Win7 Ultimate x32 clean install, just rebooted

PAserver started

C++ console app with breakpoint
"Debug configuration - 32 bit Windows platform"
Target "32 bit Windows - Snotra-x32"
Press F9

Thread Start: Thread ID: 1048. Process Test2.exe (968)
Process Start: C:\Data\Embarcadero\PAserver\Administratör-Snotra-x32\Test2\Test2.exe. Base Address: $00400000. Process Test2.exe (968)
Module Load: Test2.exe. No Debug Info. Base Address: $00400000. Process Test2.exe (968)
Module Load: ntdll.dll. No Debug Info. Base Address: $76F60000. Process Test2.exe (968)
Module Load: KERNEL32.dll. No Debug Info. Base Address: $76040000. Process Test2.exe (968)
Restart IDE

C++ console app with breakpoint
"Debug configuration - 32 bit Windows platform"
Target "32 bit Windows - Snotra-x32", Project/Deployment, Click Connect Remote Machine, Remote Status "Same"
Press F9

Thread Start: Thread ID: 3416. Process Test2.exe (3380)
Process Start: C:\Data\Embarcadero\PAserver\Administratör-Snotra-x32\Test2\Test2.exe. Base Address: $00400000. Process Test2.exe (3380)
Module Load: Test2.exe. No Debug Info. Base Address: $00400000. Process Test2.exe (3380)
Module Load: ntdll.dll. No Debug Info. Base Address: $76F60000. Process Test2.exe (3380)
Module Load: KERNEL32.dll. No Debug Info. Base Address: $76040000. Process Test2.exe (3380)
Restart IDE

C++ console app with breakpoint
"Debug configuration - 32 bit Windows platform"
Target "32 bit Windows - Snotra-x32"
Run | Load Process | Remote Remote path: Test2\Test2.exe
Remote host: Snotra-x32
After load: Do not run
Load

Thread Start: Thread ID: 2316. Process Test2.exe (500)
Process Start: C:\Data\Embarcadero\PAserver\Administratör-Snotra-x32\Test2\Test2.exe. Base Address: $00400000. Process Test2.exe (500)
Module Load: Test2.exe. No Debug Info. Base Address: $00400000. Process Test2.exe (500)
Module Load: ntdll.dll. No Debug Info. Base Address: $76F60000. Process Test2.exe (500)

Breakpoint is overcrossed

Restart IDE

C++ console app with breakpoint
"Debug configuration - 32 bit Windows platform"
Target "32 bit Windows" (no profile, local debug)
Press F9

Thread Start: Thread ID: 8488. Process Test2.exe (7628)
Process Start: C:\Data\C++ Builder project\Test2\.\Win32\Debug\Test2.exe. Base Address: $00400000. Process Test2.exe (7628)
Module Load: Test2.exe. Has Debug Info. Base Address: $00400000. Process Test2.exe (7628)
Module Load: ntdll.dll. No Debug Info. Base Address: $76F80000. Process Test2.exe (7628)

Source Breakpoint at $0040120F: C:\Data\C++ Builder project\Test2\Test2.cpp line 15. Process Test2.exe (7628)

So, so the local debugger find the symbols, but the remote don't.

Symbols not found with remote debugging 7 years 2 months ago #2134

I've now tested with a clean install of RAD Studio XE7 on Win7 x64 development host, and XE7 PAserver on target using the projects above. Still the same result: "No Debug Info"

Symbols not found with remote debugging 7 years 2 months ago #2415

I've now got help from Embarcadero Support, and it turns out ot be a bug in rmtdbgXXX.exe which doesn't convert extended characters properly. So if you are logged on to the machine running RAD Studio with a username which contains some extended characters, then this will create a subdirectory to the scratch-dir with a directory name consisting of the username plus project name. This is where conversion fails so that the debugger can't find the symbol file. This has been logged as RS-63795.

But there is a workaround:
1) in the IDE go to Tools | Options | "Environment Options" | "Environment variables" | "System variables"
2) select USERNAME and Add Override
3) change the IDE's "local" username to a string without any extended chars
4) and the IDE will then pass THAT name over to PAServer and it will not cause rmtdbg the problem, and you do not need to create a new user on the machine.
The following user(s) said Thank You: Tom, Robert

Symbols not found with remote debugging 5 years 7 months ago #6449

Have had lot of problems myself remote debugging a datasnap server on a Windows R2008 64-bits server.

In one of them using tcpview on both sides it turned out that even if using PAserver, it fires up rmtdbg.exe and with a seemingly random port number :-(

Unless opening that port in the router, further debugging didn't function, even though the server was able to connect.



Have you considered that could be a problem?





tcpview is part of the sysinternals package downloadable from Microsoft.
  • Page:
  • 1
  • 2
Moderators: April Anne