Bug 36339 - Stepping is not working for .ppdb if /optimize+ is used
Summary: Stepping is not working for .ppdb if /optimize+ is used
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: Debugger (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Zoltan Varga
URL:
Depends on:
Blocks:
 
Reported: 2015-11-29 07:55 UTC by David Karlaš
Modified: 2015-11-30 19:04 UTC (History)
2 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description David Karlaš 2015-11-29 07:55:29 UTC
If I compile with /optimize+ I can place breakpoints on all lines/instructions and breakpoints are hit fine(sequence points work fine).
But after breakpoint is hit, if I do Step it just "continues execution"(I'm pretty sure it continues stepping, but breakpoint of next line is never hit, because it's placed on wrong offset I think).

What is even bigger problem which I can't figure out... If I try to debug .dll compiled via DNX->Roslyn which has Optimize code disabled... It has same behaviour... check P.dll/P.pdb if you have some dumpPpdb tool... Probably fix for /optimize+ will fix this too...

Steps to reproduce:
1. git clone https://github.com/DavidKarlas/sdb.git
2. cd sdb
3. git checkout 381dc53117ec8d1b630990e4fb9dbca3d76ca0f5
4. git submodule update --init --recursive
5. make
6. OPTIONAL(I commited compiled Program.exe/pdb):
mono ~/GIT/roslyn/Binaries/Debug/csc.exe Program.cs  /noconfig /debug:portable /optimize+
7. In second Console window run:
mono --debugger-agent=transport=dt_socket,address=127.0.0.1:12345,server=y Program.exe
8. bin/sdb -f Commands.txt

Mono git sha: 1c90513ad99e2ebcc2d88acd54975ceae1b50636(current head of master)
Roslyn git sha: 851f060f3f18cc1585a0ef1a3caa5e23bb8f69eb

Expected SDB output:
Connecting to '127.0.0.1:12345'...
Inferior process '0' ('127.0.0.1:12345') started
Inferior process '0' ('127.0.0.1:12345') suspended
#0 [0x00000001] TestApp.MainClass.Main at /Users/davidkarlas/GIT/sdb/Program.cs:10
			Debugger.Break();
Inferior process '0' ('127.0.0.1:12345') resumed
Inferior process '0' ('127.0.0.1:12345') suspended
#0 [0x00000012] TestApp.MainClass.Main at /Users/davidkarlas/GIT/sdb/Program.cs:12


Actual SDB output:
Connecting to '127.0.0.1:12345'...
Inferior process '0' ('127.0.0.1:12345') started
Inferior process '0' ('127.0.0.1:12345') suspended
#0 [0x00000000] TestApp.MainClass.Main at /Users/davidkarlas/GIT/sdb/Program.cs:10
			Debugger.Break();
Inferior process '0' ('127.0.0.1:12345') resumed
Inferior process '0' ('127.0.0.1:12345') exited
Comment 1 Zoltan Varga 2015-11-30 19:04:42 UTC
Fixed in mono master fc7cd69b258cdbc80bb41a94942f670294372edd.

Note You need to log in before you can comment on or make changes to this bug.