Linux under 64-bit assembly system call (5)

Source: Internet
Author: User
Tags codelite

See here everyone basically know how to do Linux under the assembly system call; But some children's shoes may ask: How do you know the extra assembly code that we've solved in functions in C library?
OK, I admit: I know through the reverse, this seems to be a bit of a foul suspicion ...
For example, in the previous article in the Mmap C library function, first write a C code:

#include <stdlib.h>#include <stdio.h>#include <stdbool.h>#include <sys/mman.h>#include <sys/types.h>#include <fcntl.h>#include <errno.h>#include <string.h>#include <math.h>#include <unistd.h>intMainvoid){intSize =4096;printf("Anonymous is%08x\n", map_anonymous);printf("Err test is%s\n", Strerror ( A));//in Linux With-d_bsd_source    Char*buf = Mmap (null,size,prot_read| prot_write,map_anonymous,-1,0);printf("BUF is%p\n", buf);if(buf = = map_failed) {//if (buf < 0) {        printf("Mmap failed (%s) \ n", Strerror (errno));return 1; }return 0;}

The previous introduction of several Linux under the Integrated debugging environment, here we still use codelite instead of codeblocks, the reason is very simple, the latter need C library function source code to view C library in debugging assembly instructions, and we generally can not find these source code.

However, Codeblocks can set the syntax of the assembly, such as can be set to the Intel type:

And CodeLite seems to have found no place to set up, only with the brain between the T and Intel to convert birds.

Linux under 64-bit assembly system call (5)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.