<div dir="ltr">I tried -c and that didn't work at all (may be a Windows bug which I have to look into).<br><br><div>I guess what I'm wondering is: Why do I have to care about function bounds at all? Here's some output from my favorite Windows debugger. "u main" means unassemble main, and "u" with no arguments means "keep unassembling from the address where the last unassemble stopped".</div><div><br></div><div><div>0:000> u main</div><div>expr_test_cl!main [d:\testexe\expr_test.cpp @ 23]:</div><div>002e1050 55 push ebp</div><div>002e1051 8bec mov ebp,esp</div><div>002e1053 68883c3000 push offset expr_test_cl!__xt_z+0x144 (00303c88)</div><div>002e1058 e8d0000000 call expr_test_cl!printf (002e112d)</div><div>002e105d 83c404 add esp,4</div><div>002e1060 68983c3000 push offset expr_test_cl!__xt_z+0x154 (00303c98)</div><div>002e1065 e8c3000000 call expr_test_cl!printf (002e112d)</div><div>002e106a 83c404 add esp,4</div><div>0:000> u</div><div>expr_test_cl!main+0x1d [d:\testexe\expr_test.cpp @ 26]:</div><div>002e106d 68a83c3000 push offset expr_test_cl!__xt_z+0x164 (00303ca8)</div><div>002e1072 e8b6000000 call expr_test_cl!printf (002e112d)</div><div>002e1077 83c404 add esp,4</div><div>002e107a b801000000 mov eax,1</div><div>002e107f 5d pop ebp</div><div>002e1080 c3 ret</div><div>002e1081 cc int 3</div><div>002e1082 cc int 3</div><div>0:000> u</div><div>expr_test_cl!main+0x33:</div><div>002e1083 cc int 3</div><div>002e1084 cc int 3</div><div>002e1085 cc int 3</div><div>002e1086 cc int 3</div><div>002e1087 cc int 3</div><div>002e1088 cc int 3</div><div>002e1089 cc int 3</div><div>002e108a cc int 3</div><div>0:000> u</div><div>expr_test_cl!main+0x3b:</div><div>002e108b cc int 3</div><div>002e108c cc int 3</div><div>002e108d cc int 3</div><div>002e108e cc int 3</div><div>002e108f cc int 3</div><div>002e1090 cc int 3</div><div>002e1091 cc int 3</div><div>002e1092 cc int 3</div><div>0:000> u</div><div>expr_test_cl!main+0x43:</div><div>002e1093 cc int 3</div><div>002e1094 cc int 3</div><div>expr_test_cl!_get_printf_count_output [f:\dd\vctools\crt\crtw32\stdio\printf.c @ 166]:</div><div>002e1095 8b0d00b43000 mov ecx,dword ptr [expr_test_cl!__security_cookie (0030b400)]</div><div>002e109b 33c0 xor eax,eax</div><div>002e109d 83c901 or ecx,1</div><div>002e10a0 390d40c53000 cmp dword ptr [expr_test_cl!__enable_percent_n (0030c540)],ecx</div><div>002e10a6 0f94c0 sete al</div><div>002e10a9 c3 ret</div><div>0:000> u</div><div>expr_test_cl!_printf_l [f:\dd\vctools\crt\crtw32\stdio\printf.c @ 79]:</div><div>002e10aa 55 push ebp</div><div>002e10ab 8bec mov ebp,esp</div><div>002e10ad 8d4510 lea eax,[ebp+10h]</div><div>002e10b0 50 push eax</div><div>002e10b1 ff750c push dword ptr [ebp+0Ch]</div><div>002e10b4 ff7508 push dword ptr [ebp+8]</div><div>002e10b7 e879060000 call expr_test_cl!_vprintf_l (002e1735)</div><div>002e10bc 83c40c add esp,0Ch</div></div><div><br></div><div>Note that there's no knowledge of function bounds. It just goes. Is it possible to do something like this in LLDB? Or if not, can I implement it?</div><div><br></div></div><br><div class="gmail_quote">On Wed Jan 21 2015 at 2:11:03 PM Ed Maste <<a href="mailto:emaste@freebsd.org">emaste@freebsd.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 21 January 2015 at 16:57, Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:<br>
><br>
> Is there any way to work around this restriction? It seems like it<br>
> shouldn't matter what the bounds of the function are, or if there's even a<br>
> function at this address at all. As long as there's code.<br>
<br>
You should be able to use a combination of -s start address / -e end<br>
address / -c instruction count.<br>
<br>
Perhaps we could disassemble a small number of instructions starting<br>
from the provided address if -a is given an address outside of a<br>
function.<br>
</blockquote></div>