- /* Here we go, fire an addr2line up */
- subcmd = bprintf("%s -f -e %s %s",ADDR2LINE,p, addrs[i]);
- free(p);
- VERB1("Fire a new command: '%s'",subcmd);
- subpipe = popen(subcmd,"r");
- if (!subpipe) {
- CRITICAL0("Cannot fork addr2line to display the backtrace");
- abort();
+ /* Here we go, fire an addr2line up */
+ subcmd = bprintf("%s -f -e %s %s",ADDR2LINE,p, addrs[i]);
+ free(p);
+ VERB1("Fire a new command: '%s'",subcmd);
+ subpipe = popen(subcmd,"r");
+ if (!subpipe) {
+ CRITICAL0("Cannot fork addr2line to display the backtrace");
+ abort();
+ }
+ fgets(line_func,1024,subpipe);
+ line_func[strlen(line_func)-1]='\0';
+ fgets(line_pos,1024,subpipe);
+ line_pos[strlen(line_pos)-1]='\0';
+ pclose(subpipe);
+ free(subcmd);