{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/5037","repository_url":"https://api.github.com/repos/dotnet/coreclr","labels_url":"https://api.github.com/repos/dotnet/coreclr/issues/5037/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/5037/comments","events_url":"https://api.github.com/repos/dotnet/coreclr/issues/5037/events","html_url":"https://github.com/dotnet/coreclr/issues/5037","id":155404128,"number":5037,"title":"[ARM32/Linux]  sos ClrStack does not work after bpmd","user":{"login":"chunseoklee","id":4862887,"avatar_url":"https://avatars.githubusercontent.com/u/4862887?v=3","gravatar_id":"","url":"https://api.github.com/users/chunseoklee","html_url":"https://github.com/chunseoklee","followers_url":"https://api.github.com/users/chunseoklee/followers","following_url":"https://api.github.com/users/chunseoklee/following{/other_user}","gists_url":"https://api.github.com/users/chunseoklee/gists{/gist_id}","starred_url":"https://api.github.com/users/chunseoklee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chunseoklee/subscriptions","organizations_url":"https://api.github.com/users/chunseoklee/orgs","repos_url":"https://api.github.com/users/chunseoklee/repos","events_url":"https://api.github.com/users/chunseoklee/events{/privacy}","received_events_url":"https://api.github.com/users/chunseoklee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-05-18T02:32:31Z","updated_at":"2016-05-19T14:32:32Z","closed_at":null,"body":"Thank to a92eac6b4b635285525c80dcd9dadf3616d96370, bpmd of sosplugin works fine on arm32/linux. But, clrstack does not work after bpmd command.\r\n\r\ntest commit : e78338ef715dc6fd89d9cbd0bf93c7f88d211c20 ( fetched today morning )\r\n```\r\nsh-3.2# /home/twoflower/llvm_z3/bin/lldb-3.8.1 -o \"plugin load libsosplugin.so\" -o \"process launch -s\" -o \"setclrpath ./\" -o \"breakpoint set -n LoadLibraryExW\" -o \"c\" -o \"br del\" -- corerun hello.exe\r\n(lldb) target create \"corerun\"\r\nCurrent executable set to 'corerun' (arm).\r\n(lldb) settings set -- target.run-args  \"hello.exe\"\r\n(lldb) plugin load libsosplugin.so\r\n(lldb) process launch -s\r\nProcess 31170 launched: '/opt/home/twoflower/bin/coreclr/corerun' (arm)\r\n(lldb) setclrpath ./\r\nSet load path for sos/dac/dbi to './'\r\n(lldb) breakpoint set -n LoadLibraryExW\r\nBreakpoint 1: no locations (pending).\r\nWARNING:  Unable to resolve breakpoint to any actual locations.\r\n(lldb) c\r\n1 location added to breakpoint 1\r\nProcess 31170 resuming\r\nProcess 31170 stopped\r\n* thread #1: tid = 31170, 0xb6a1aedc libcoreclr.so`::LoadLibraryExW(lpLibFileName=0x000648c0, hFile=0x00000000, dwFlags=0) + 28 at module.cpp:214, name = 'corerun', stop reason = breakpoint 1.1\r\n    frame #0: 0xb6a1aedc libcoreclr.so`::LoadLibraryExW(lpLibFileName=0x000648c0, hFile=0x00000000, dwFlags=0) + 28 at module.cpp:214\r\n   211 \t    IN /*Reserved*/ HANDLE hFile,\r\n   212 \t    IN DWORD dwFlags)\r\n   213 \t{\r\n-> 214 \t    if (dwFlags != 0) \r\n   215 \t    {\r\n   216 \t        // UNIXTODO: Implement this!\r\n   217 \t        ASSERT(\"Needs Implementation!!!\");\r\n\r\n(lldb) br del\r\nAll breakpoints removed. (1 breakpoint)\r\n(lldb) clrstack\r\nOS Thread Id: 0x79c2 (1)\r\nChild SP       IP Call Site\r\nBED3F290 b6a1aedc [Frame: beffea18] System.AppDomain.SetupDomain(Boolean, System.String, System.String, System.String[], System.String[])\r\nBED3F290 b6a1aedc [Frame: befff468] \r\nBED3F290 b6a1aedc [Frame: befff734] \r\n(lldb) bpmd hello.exe Hello.Main\r\nAdding pending breakpoints...\r\n(lldb) c\r\nProcess 31170 resuming\r\n(lldb) JITTED hello!Hello.Main()\r\nSetting breakpoint: breakpoint set --address 0xB1CFA45D [Hello.Main()]\r\nProcess 31170 stopped\r\n* thread #1: tid = 31170, 0xb1cfa45c, name = 'corerun', stop reason = breakpoint 3.1\r\n    frame #0: 0xb1cfa45c\r\n->  0xb1cfa45c: vmax.f32 d27, d2, d0\r\n    0xb1cfa460: .long  0xf2cb3340                ; unknown opcode\r\n    0xb1cfa464: ldmdavs r8, {r4, r5, r6, r8, r9, r12, sp}\r\n    0xb1cfa468: .long  0x03b1f648                ; unknown opcode\r\nclrstack\r\nOS Thread Id: 0x79c2 (1)\r\nFailed to start stack walk: 80131c36\r\n(lldb) \r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/comments/220342507","html_url":"https://github.com/dotnet/coreclr/issues/5037#issuecomment-220342507","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/5037","id":220342507,"user":{"login":"Dmitri-Botcharnikov","id":17641326,"avatar_url":"https://avatars.githubusercontent.com/u/17641326?v=3","gravatar_id":"","url":"https://api.github.com/users/Dmitri-Botcharnikov","html_url":"https://github.com/Dmitri-Botcharnikov","followers_url":"https://api.github.com/users/Dmitri-Botcharnikov/followers","following_url":"https://api.github.com/users/Dmitri-Botcharnikov/following{/other_user}","gists_url":"https://api.github.com/users/Dmitri-Botcharnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/Dmitri-Botcharnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dmitri-Botcharnikov/subscriptions","organizations_url":"https://api.github.com/users/Dmitri-Botcharnikov/orgs","repos_url":"https://api.github.com/users/Dmitri-Botcharnikov/repos","events_url":"https://api.github.com/users/Dmitri-Botcharnikov/events{/privacy}","received_events_url":"https://api.github.com/users/Dmitri-Botcharnikov/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T14:32:32Z","updated_at":"2016-05-19T14:32:32Z","body":"It seems that problem is with `CLRDATA_ADDRESS_TO_TADDR` (src/debug/daccess/dacimpl.h:57). Although address is valid 32-bit, check fails and calls `DbgAssertDialog` with strange parameters.\r\n```\r\ndmitryb@hoult-odroid:~/work/demo$ gdb lldb\r\nGNU gdb (Ubuntu 7.10-1ubuntu2) 7.10\r\nCopyright (C) 2015 Free Software Foundation, Inc.\r\n... (omitted)\r\nReading symbols from lldb...(no debugging symbols found)...done.\r\n(gdb) break request.cpp:1912\r\nNo symbol table is loaded.  Use the \"file\" command.\r\nMake breakpoint pending on future shared library load? (y or [n]) y\r\nBreakpoint 1 (request.cpp:1912) pending.\r\n(gdb) run\r\nStarting program: /home/dmitryb/work/lldb/bin/lldb \r\n[Thread debugging using libthread_db enabled]\r\nUsing host libthread_db library \"/lib/arm-linux-gnueabihf/libthread_db.so.1\".\r\n(lldb) command source -s 1 '/home/dmitryb/work/demo/./.lldbinit'\r\n1 location added to breakpoint 1\r\n(lldb) bpmd hello3.1.exe Program.show_message\r\nAdding pending breakpoints...\r\n(lldb) c\r\nProcess 11904 resuming\r\n(lldb) JITTED hello3.1!HelloWorld3.Program.show_message()\r\nSetting breakpoint: breakpoint set --address 0xB008253D [HelloWorld3.Program.show_message()]\r\nProcess 11904 stopped\r\n* thread #1: tid = 11904, 0xb008253c, name = 'corerun', stop reason = breakpoint 3.1\r\n    frame #0: 0xb008253c\r\n->  0xb008253c: vmax.f32 d27, d2, d0\r\n    0xb0082540: .long  0xf2cb3358                ; unknown opcode\r\n    0xb0082544: ldmdavs r11, {r4, r6, r8, r9, r12, sp}\r\n    0xb0082548: vcgt.s8 d25, d2, d2\r\nclrstack\r\n\r\nBreakpoint 1, ClrDataAccess::GetFrameName (this=0x1de2d8, vtable=3066770328, count=2048, frameName=0xaf1f75d4 <g_mdName> u\"HelloWorld3.Program.Main(System.String[])\", \r\n    pNeeded=0x0) at /home/dima/work/coreclr/src/debug/daccess/request.cpp:1913\r\n1913    /home/dima/work/coreclr/src/debug/daccess/request.cpp: No such file or directory.\r\n(gdb) n\r\n1916    in /home/dima/work/coreclr/src/debug/daccess/request.cpp\r\n(gdb) n\r\n1918    in /home/dima/work/coreclr/src/debug/daccess/request.cpp\r\n(gdb) s\r\nCLRDATA_ADDRESS_TO_TADDR (cdAddr=1) at /home/dima/work/coreclr/src/debug/daccess/dacimpl.h:58\r\n58      /home/dima/work/coreclr/src/debug/daccess/dacimpl.h: No such file or directory.\r\n(gdb) n\r\n59      in /home/dima/work/coreclr/src/debug/daccess/dacimpl.h\r\n(gdb) n\r\n62      in /home/dima/work/coreclr/src/debug/daccess/dacimpl.h\r\n(gdb) n\r\n63      in /home/dima/work/coreclr/src/debug/daccess/dacimpl.h\r\n(gdb) p/x cdAddr\r\n$1 = 0xb6cb3398\r\n(gdb) p/x iSignedAddr\r\n$2 = 0xb6cb3398\r\n(gdb) s\r\n65      in /home/dima/work/coreclr/src/debug/daccess/dacimpl.h\r\n(gdb) s\r\nDbgAssertDialog (szFile=0x1000 <error: Cannot access memory at address 0x1000>, iLine=0, szExpr=0x1 <error: Cannot access memory at address 0x1>)\r\n    at /home/dima/work/coreclr/src/utilcode/debug.cpp:643\r\n643     /home/dima/work/coreclr/src/utilcode/debug.cpp: No such file or directory.\r\n```\r\n"}}