Re: Stack trace
От | Bramandia Ramadhana |
---|---|
Тема | Re: Stack trace |
Дата | |
Msg-id | 700260640811162208u31dec815gc1def290d8f9a30d@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Stack trace (Emmanuel Cecchet <manu@frogthinker.org>) |
Ответы |
Re: Stack trace
Re: Stack trace |
Список | pgsql-hackers |
Hm the backtrace() method does not give the line numbers of the methods in the stack trace, it only gives the hexadecimaloffset. Is there anyway to retrieve the line numbers? <br /><br />I have tried to Google it but to no avail.<br/><br />Regards,<br /><br />Bramandia R.<br /><br /><div class="gmail_quote">On Tue, Nov 4, 2008 at 12:26 PM, EmmanuelCecchet <span dir="ltr"><<a href="mailto:manu@frogthinker.org">manu@frogthinker.org</a>></span> wrote:<br /><blockquoteclass="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left:1ex;"><div class="Ih2E3d">Bramandia Ramadhana wrote:<br /><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Is there any way to printout the stack trace of the current location?<br /></blockquote></div> Not sure if Postgres has something in the utilsfor that.<br /> You can use backtrace() in glibc. Solaris 9 libc has printstack(). Not sure what's available for Windows.<divclass="Ih2E3d"><br /><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin:0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> I am looking for something like print_stack_trace(); that I can insert inarbitrary location in the code.<br /></blockquote></div> Some references:<br /><a href="http://www.tlug.org.za/wiki/index.php/Obtaining_a_stack_trace_in_C_upon_SIGSEGV" target="_blank">http://www.tlug.org.za/wiki/index.php/Obtaining_a_stack_trace_in_C_upon_SIGSEGV</a><br/><a href="http://www.delorie.com/gnu/docs/glibc/libc_665.html" target="_blank">http://www.delorie.com/gnu/docs/glibc/libc_665.html</a><br/><br /> manu<br /><br /> -- <br /> Emmanuel Cecchet<br/> FTO @ Frog Thinker Open Source Development & Consulting<br /><font color="#888888"> --<br /> Web: <a href="http://www.frogthinker.org"target="_blank">http://www.frogthinker.org</a><br /> email: <a href="mailto:manu@frogthinker.org"target="_blank">manu@frogthinker.org</a><br /> Skype: emmanuel_cecchet<br /><br /></font></blockquote></div><br/>
В списке pgsql-hackers по дате отправления: