Linux
文章平均质量分 58
卐卍扫地僧卐卍
Hello world!
展开
-
gdb调试基本方法
gdb调试基本方法gdb调试常用命令命令命令缩写命令说明listl显示多行源代码breakb设置断点infoi描述程序的状态displaydisp跟踪查看某个变量printp打印内部变量值framef查看栈帧backtracebt查看函数调用信息watch 监视变量值的变化set v...原创 2018-11-30 22:31:44 · 483 阅读 · 0 评论 -
Linux /etc/passwd内容图解
Linux /etc/passwd内容图解原创 2019-03-15 11:29:50 · 173 阅读 · 0 评论 -
Linux内核数据结构——哈希表
Linux内核数据结构——哈希表1、基本概念In computing, a hash table (hash map) is a data structure that implements an associative array abstract data type, a structure that can map keys to values. A hash table uses a ...原创 2019-03-06 16:49:06 · 719 阅读 · 0 评论 -
valgrind的安装及使用
ubuntu16.04环境下valgrind的安装及使用1、Valgrind简介Valgrind是运行在Linux上一套基于仿真技术的程序调试和分析工具,它的主要作者是获得过Google-O’Reilly开源大奖的Julian Seward,它包含一个内核——个软件合成的CPU,和一系列的小工具,每个工具都可以完成一项任务──调试,分析,或测试等;Valgrind可以检测内存泄漏和内存违例...原创 2019-02-22 16:35:47 · 502 阅读 · 1 评论 -
基类指针调用派生类中定义的方法
基类指针调用派生类中定义的方法1、实例分析class BaseClass{public: BaseClass(); virtual ~BaseClass(); virtual void Operation();};class DerivedClass:public BaseClass{public: DerivedClass(); vir...原创 2019-01-29 11:05:12 · 2057 阅读 · 0 评论 -
可变参数函数
可变参数(va)函数va函数的定义和va宏VA函数(variable argument function),参数个数可变函数,又称可变参数函数。/* va函数原型声明格式 */type va_function(tpye arg1, type arg2, ...);/****************************************** 1、至少有一个固定参数; 2、...原创 2019-01-08 17:53:39 · 1393 阅读 · 0 评论 -
c库打印函数
函数#include<stdio.h>int printf(const char *format, ... );/* [until c99]写结果到stdout */int printf(const char *restrict format, ... );/* [since c99] */int fprintf(FILE *stream, const char *format...原创 2019-01-08 10:12:40 · 1327 阅读 · 1 评论 -
linux数据结构——链表
linux内核数据结构——链表源码分析重要宏定义#ifndef offsetof#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)#endif#ifndef container_of/** * container_of - cast a member of a structure out t...原创 2018-11-30 22:42:09 · 418 阅读 · 0 评论 -
Git局域网服务器搭建
Git局域网服务器搭建1.安装环境cat /proc/version2.安装Git和SSHsudo apt-get install git openssh-server openssh-clientsudo service ssh restart3.增加git用户sudo useradd git4.客户端安装gitwindows版或linux版5.客户端创建密匙及...原创 2018-11-30 22:39:53 · 865 阅读 · 0 评论 -
构建Linux根文件系统
构建Linux根文件系统1、基础知识1.1、基本概念In computing, a file system or filesystem controls how data is stored and retrieved. Without a file system, information placed in a storage medium would be one large body ...原创 2019-04-17 11:25:27 · 243 阅读 · 0 评论