After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 738784 - Add a way to retrieve the vala method path from a C function name
Add a way to retrieve the vala method path from a C function name
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Code Generator
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2014-10-18 19:26 UTC by Carl
Modified: 2018-05-22 15:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Carl 2014-10-18 19:26:20 UTC
I'm trying to display vala stacktraces. I managed to get the function name of each stack frame. Unfortunately, all I have is the C function and not the vala class+vala method.

Here's the stacktrace I have: 

An error occured (SIGTRAP) in ../src/LocalLibrary.vala, line 486 in 'noise_local_library_real_add_playlist'
   The reason is likely an uncaught error.

 *  #1  ../src/LocalLibrary.vala     line 486    in 'noise_local_library_real_add_playlist'               
        at /home/cran/Projects/elementary/noise/noise-perf-instant-search/src/LocalLibrary.vala:486
    #2  ../src/LibraryWindow.vala    line 947    in 'noise_library_window_load_playlists'
        at /home/cran/Projects/elementary/noise/noise-perf-instant-search/src/LibraryWindow.vala:947
    #3  ../src/LibraryWindow.vala    line 756    in 'noise_library_window_build_ui'
        at /home/cran/Projects/elementary/noise/noise-perf-instant-search/src/LibraryWindow.vala:756
    #4  ../src/Noise.vala            line 106    in 'noise_app_real_activate'
        at /home/cran/Projects/elementary/noise/noise-perf-instant-search/src/Noise.vala:106
    #5  ../src/main.vala             line  43    in '_vala_main'
        at /home/cran/Projects/elementary/noise/noise-perf-instant-search/src/main.vala:43
    #6  ../src/main.vala             line  21    in 'main'
        at /home/cran/Projects/elementary/noise/noise-perf-instant-search/src/main.vala:21

(see the attached file for a better display)

I have "noise_local_library_real_add_playlist" instead of Noise.local_library.add_playlist
Is there a way to have the real "vala path"?

A nice solution would be to generate a lookup in external file/gresource (for portability reasons) and provide basic functions to access such a table.
Comment 1 Luca Bruno 2014-10-19 21:53:46 UTC
Maybe there's a way to tell gcc about the vala method name. Couldn't find anything though, it's hard to search.
Comment 2 GNOME Infrastructure Team 2018-05-22 15:19:19 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/481.