As previously guessed, the overload library is once again unrequired. Sigh.
commit3e3e68fa09e9a6e6b5a4c820eed66512d046418a
authorstrange <kawk256@gmail.com>
Sun, 15 Nov 2009 06:54:16 +0000 (14 23:54 -0700)
committerstrange <kawk256@gmail.com>
Sun, 15 Nov 2009 06:55:37 +0000 (14 23:55 -0700)
treeb949dd30a120fdd89507898a7c2e5f5f672a1e7d
parentfc0f769a701b9fb8549f36749fb14ba7681749a5
As previously guessed, the overload library is once again unrequired. Sigh.

Basically, a sequence of gdb commands can basically replicate the
functionality of the overload library. An example gdb MI2 session to
demonstrate:

strange@quark:~/c/aesalon$ gdb --interpreter=mi2 ~/c/malloc_test
(gdb)
-break-insert -f __malloc
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
    addr="<PENDING>",pending="__malloc",times="0",original-location="__malloc"}
(gdb)
-exec-run
^running
(gdb)
*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",
    frame={addr="0x00007ffff7b03770",func="*__GI___libc_malloc",
    args=[{name="bytes",value="1"}],file="malloc.c",line="3593"},thread-id="1",
    stopped-threads="all"
(gdb)
-break-after 1 1
^done
(gdb)
-exec-finish
^running
*running,thread-id="1"
(gdb)
*stopped,reason="function-finished",frame={addr="0x000000000040054a",
    func="allocate_memory",args=[],file="malloc_test_2.c",
    fullname="/home/strange/c/malloc_test_2.c",line="7"},gdb-result-var="$1",
    return-value="(void *) 0x601010",thread-id="1",stopped-threads="all"
(gdb)
-exec-continue
^running
(gdb)
*stopped,reason="exited-normally"
(gdb)

(edited for clarity, of course.)

The interesting line here is the '*stopped,reason="function-finished"', in
particular the result-record 'return-value' . . .

That alone should be enough. Sorry, but goodbye again, overload.
src/overload/Overload.c