I don't know what you mean by all_procedures not being restricted? It is.
you have access to the line number - format call stack gives it to you.
you also have compile time 'macros' that give this to you
ops$tkyte%ORA11GR2> create or replace procedure p
2 as
3 begin
4 dbms_output.put_line( 'this is line ' || $$PLSQL_LINE || ' of plsql unit ' || $$PLSQL_UNIT );
5
6 null;
7
8 dbms_output.put_line( 'this is line ' || $$PLSQL_LINE || ' of plsql unit ' || $$PLSQL_UNIT );
9 end;
10 /
Procedure created.
ops$tkyte%ORA11GR2> exec p
this is line 4 of plsql unit P
this is line 8 of plsql unit P
PL/SQL procedure successfully completed.
I assume you were doing packages - seems reasonable to assume that - because you would get the line number and function name right out of format call stack at the worst or using the above at the best.
Just save the unit and line number - you get the function name anytime you want later.