Hi Matthew,

Thanks for your illustration and patch. I have patched the code to geany source code. Now I can get the memory address of buffer as your mentioned. When I tried your patch, I also dumped the whole memory and checked the heap memory. For example, I wrote several characters in one line. Your patch can give me the output "** The buffer for file '/home/sun/Desktop/1' is at 0x8c98cd0:0x8c98ce9", which means the start address is 0x8c98cd0, and the end address is 0x8c98ce9. However, when I dumped the heap memory and found out the address of same characters string. They are not the same.  The heap start address is 08882000. So the real virtual address is 0x8882000 + 0x002e0568 (offset) = 0x8b62568. Do you have any idea about this situation?

002e0560  00 00 00 00 11 00 00 00  77 75 6a 69 61 63 68 75 
002e0570  61 6e 00 00 19 00 00 00  01 00 00 00 01 00 00 00  


Thank you very much!

Best Regards,
Pengfei

On Fri, Oct 9, 2015 at 8:06 PM, Matthew Brush <mbrush@codebrainz.ca> wrote:
On 15-10-09 04:43 PM, Matthew Brush wrote:
On 15-10-09 03:42 PM, Pengfei Sun wrote:
[...] Do you have any further suggestions for my case?


I made a quick and dirty patch that will log on the terminal wherever in (virtual) memory the buffer is stored, whenever it moves, per-file. See attachment.

Cheers,
Matthew Brush


_______________________________________________
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel