[CentralOH] 2017-03-27 會議 Scribbles 落書/惡文?: max morlocke memory leaks; jim prior named groups in regular expressions and f-strings; tessel 2

Neil Ludban nludban at columbus.rr.com
Fri Apr 7 11:06:14 EDT 2017


On Thu, 6 Apr 2017 18:55:08 -0400
jep200404 at columbus.rr.com wrote:
> ###############################################################################
> 
> Memory Leaks
> 
> Max Morlocke
> Head of Engineering at Mineralsoft
> https://github.com/kedlav
> Mineralsoft
> Austin, TX
> kedlav at gmail.com
> 
> https://github.com/kedlav/presentations/blob/master/memory_leaks.pdf
> 
> some tricky ways that memory can leak
> 
> - mutable default parameters are usually a bug than can also gobble memory
> - unhandled traceback keeping stack frame alive
> - cyclic references
> 
> does not like gdb (because he does not have neck beard ala Pat Rothluss?)
> 
>     wp:Patrick Rothfuss
>     https://www.goodreads.com/author/show/108424.Patrick_Rothfuss
> 
> someone else
> has no problem using gdb
> nonetheless, maybe gdb is wrong tool for interpreted language such as Python
> (thinking and prints work just fine for many folks)

Python has its own set of gdb scripts for pretty printing the C
data structures that represent interpreted objects:

	https://docs.python.org/devguide/gdb.html

Which are implemented in Python because gdb 7 added an (optional)
embedded Python interpreter for all your debug scripting needs:

	https://sourceware.org/gdb/current/onlinedocs/gdb/Python.html

Here's a more interesting example using gdb's Python API to read an
embedded target's memory and translate addresses to source code, sort
of like printing a call stack but for "goto"s:

	https://learn.adafruit.com/debugging-the-samd21-with-gdb/micro-trace-buffer


More information about the CentralOH mailing list