Click here to Skip to main content
15,898,596 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to generate pdf files on C#?? Pin
Richard MacCutchan8-Jan-20 6:40
mveRichard MacCutchan8-Jan-20 6:40 
GeneralRe: How to generate pdf files on C#?? Pin
OriginalGriff8-Jan-20 11:22
mveOriginalGriff8-Jan-20 11:22 
QuestionHistory of compiler optimization: function inlining Pin
Bernhard Hiller7-Jan-20 22:35
Bernhard Hiller7-Jan-20 22:35 
AnswerRe: History of compiler optimization: function inlining Pin
F-ES Sitecore7-Jan-20 22:44
professionalF-ES Sitecore7-Jan-20 22:44 
AnswerRe: History of compiler optimization: function inlining Pin
OriginalGriff7-Jan-20 22:51
mveOriginalGriff7-Jan-20 22:51 
AnswerRe: History of compiler optimization: function inlining Pin
Peter_in_27808-Jan-20 1:20
professionalPeter_in_27808-Jan-20 1:20 
AnswerRe: History of compiler optimization: function inlining Pin
Gerry Schmitz8-Jan-20 6:08
mveGerry Schmitz8-Jan-20 6:08 
AnswerRe: History of compiler optimization: function inlining Pin
kalberts23-Jan-20 0:52
kalberts23-Jan-20 0:52 
Inlining is ages old, but in the old days, there were compilers / debuggers that couldn't handle it properly. If you wanted to step line by line through an inlined function, you had to turn off that feature while debugging. Maybe this applied only to a few compilers. I don't know if the limitation was in the compiler, the debugger or the debug format - it could be either.

There were other optimzing features that you had to turn off while debugging. E.g. an optimizer may detect that you are doing the same calculations twice, arguments being unchanged from the first to the second calculation. So it decides to rather store the first result in a register or temporary variable, and skip the second calculation. Now you set a breakpoint in the middle of second calculation (but not in the first) - but there is no code where the breakpoint can be inserted! It takes some juggling of instructions and breakpoint analysis to handle such situations.

A (true) story from the old days - not directly connected to optimization, but illustrating simlar issues:

This debugger could single step at the function call level (which was more useful than you think - I wish we had it in moder debuggers!), or at the source line level. There was a fatal crash in this 2000 lines(!) function when stepping call by call. When line-level stepping was enabled, the code worked perfectly fine. It took some effort to discover why, and it illustrates the issues when making a debugger:

In line mode, the debugger replaces the first instruction generated by each source line with at BPT instruction, saving the original instruction in its own buffer. When the BPT is reached, the original instruction is re-inserted into the code, the PC decremented to execute the same address again (this time with the original instruction rather than the BPT), the cpu is told to single step at the machine instruction level, and the BPT is re-inserted for the next time this point is reached.

As so often is the case: The culprit was a wild pointer, writing into code memory (the machine did not have separate spaces for code and data), overwriting an instruction. But in line mode, the debugger had a saved copy of the instruction, protected from the wild pointer. So the debugger replaced the destroyed instruction with the correct one; that is why the code didn't crash in line stepping mode.
QuestionAES Decryption error "The input data is not a complete block" Pin
Member 132610847-Jan-20 0:14
Member 132610847-Jan-20 0:14 
AnswerRe: AES Decryption error "The input data is not a complete block" Pin
OriginalGriff7-Jan-20 0:36
mveOriginalGriff7-Jan-20 0:36 
GeneralRe: AES Decryption error "The input data is not a complete block" Pin
Member 132610847-Jan-20 1:38
Member 132610847-Jan-20 1:38 
GeneralRe: AES Decryption error "The input data is not a complete block" Pin
OriginalGriff7-Jan-20 1:52
mveOriginalGriff7-Jan-20 1:52 
QuestionChatBot retrieve data from SharePoint On Premise Issue Pin
engsooncheah5-Jan-20 14:43
engsooncheah5-Jan-20 14:43 
AnswerRe: ChatBot retrieve data from SharePoint On Premise Issue Pin
Eddy Vluggen6-Jan-20 1:38
professionalEddy Vluggen6-Jan-20 1:38 
AnswerRe: ChatBot retrieve data from SharePoint On Premise Issue Pin
Afzaal Ahmad Zeeshan6-Jan-20 3:23
professionalAfzaal Ahmad Zeeshan6-Jan-20 3:23 
GeneralRe: ChatBot retrieve data from SharePoint On Premise Issue Pin
engsooncheah6-Jan-20 14:14
engsooncheah6-Jan-20 14:14 
GeneralRe: ChatBot retrieve data from SharePoint On Premise Issue Pin
Afzaal Ahmad Zeeshan6-Jan-20 23:09
professionalAfzaal Ahmad Zeeshan6-Jan-20 23:09 
GeneralRe: ChatBot retrieve data from SharePoint On Premise Issue Pin
engsooncheah7-Jan-20 21:23
engsooncheah7-Jan-20 21:23 
GeneralRe: ChatBot retrieve data from SharePoint On Premise Issue Pin
Afzaal Ahmad Zeeshan7-Jan-20 22:03
professionalAfzaal Ahmad Zeeshan7-Jan-20 22:03 
GeneralRe: ChatBot retrieve data from SharePoint On Premise Issue Pin
engsooncheah9-Jan-20 14:34
engsooncheah9-Jan-20 14:34 
GeneralRe: ChatBot retrieve data from SharePoint On Premise Issue Pin
Afzaal Ahmad Zeeshan9-Jan-20 22:26
professionalAfzaal Ahmad Zeeshan9-Jan-20 22:26 
GeneralRe: ChatBot retrieve data from SharePoint On Premise Issue Pin
engsooncheah21-Jan-20 19:37
engsooncheah21-Jan-20 19:37 
Questionpush notification from android c# Pin
Member 477398728-Dec-19 11:51
Member 477398728-Dec-19 11:51 
AnswerRe: push notification from android c# Pin
OriginalGriff28-Dec-19 19:55
mveOriginalGriff28-Dec-19 19:55 
GeneralRe: push notification from android c# Pin
Member 477398728-Dec-19 20:45
Member 477398728-Dec-19 20:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.