Gdb / ddd Program signal SIGILL

I wrote a very simple program in Linux using C ++ that downloads images from some website via http (basically a developed http client request) using cURL libraries. http://curl.haxx.se/libcurl/c/allfuncs.html

#define CURL_STATICLIB
#include <stdio.h>
#include <stdlib.h>
#include </usr/include/curl/curl.h>
#include </usr/include/curl/stdcheaders.h>
#include </usr/include/curl/easy.h>

size_t write_data(void *ptr, size_t size, size_t nmemb, FILE *stream) {
    size_t written = fwrite(ptr, size, nmemb, stream);
    return written;
}

int main(void) {
    CURL *curl;
    FILE *fp;
    CURLcode res;

    char *url = "http://www.example.com/test_img.png"; 
    char outfilename[FILENAME_MAX] = "/home/c++_proj/output/web_req_img.png";
    curl = curl_easy_init();
    if (curl) {
        fp = fopen(outfilename,"wb");
        curl_easy_setopt(curl, CURLOPT_URL, url);
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
        res = curl_easy_perform(curl);
        /* always cleanup */
        curl_easy_cleanup(curl);
        fclose(fp);
    }
    return 0;
}

I checked the code and it works great. I see that the image is uploaded and I can view the image (without errors or warnings). Since I plan to expand my code, I tried installing ddd and using the debugger, but the debugger does not work, and my program exits with some signal errors when I try to run my program using ddd.

This is mistake:

 (Threadd debugging using libthread_db enabled)
 Using host libthread_db library "/lib/arm-linux-gnueadihf/libthread_db.so.1"

 Program received signal SIGILL, illegal instruction.
 0xb6a5c4C0 in ?? () from /usr/lib/arm-linux-gnueadbihf/libcrypto.so.1.0.0

, ddd, gdb, , . ( , gdb ddd)

ddd , cURL, .

- , , ? - cURL ddd? , , , ! , - cURL, ddd ? ! .

+5
2

, . , ( gdb, , , ). gdb, SIGILL : handle SIGILL pass nostop noprint.

, , .

+13
 Program received signal SIGILL, illegal instruction.
 0xb6a5c4C0 in ?? () from /usr/lib/arm-linux-gnueadbihf/libcrypto.so.1.0.0

- , , ?

. .

libcrypto.so - OpenSSL. OpenSSL cpu, , , . SIGILL, .

, ARM, IA-32, - Intel IA-32, cpuid . cpuid cpu, SIGILL.

IA-32 ARM cpuid . Exception Level 1 (EL-1), EL-0. , ARM jmpbuf SIGILL. , SIGILL , .

OpenSSL SIGILL - Apple, Apple . . PR 3108, SIGILL MacOS X. . . ARMv8 ?

OpenSSL SIGILL FAQ. . 17 FAQ OpenSSL: SIGILL OpenSSL: ? . SSL_library_init SIGILL gdb .

+1

All Articles