gnu

How to loop on strings and remove the string array

杀马特。学长 韩版系。学妹 提交于 2019-12-13 03:25:42
问题 I've the following code inside make file which gets from command array of strings apps := $(shell fxt run apps) go: @for v in $(apps) ; do \ echo inside recipe loop with sh command: $$v ; \ done The command returns array like [app1 app2 appN] (could be many apps inside) But I need it to be app1 app2 appN , any idea how to remove the array [] ? when I run make I got the following inside recipe loop with sh command: [app inside recipe loop with sh command: app2] 回答1: You simple can use subst

PaperSize option for Gnuplot in fitting fonts?

对着背影说爱祢 提交于 2019-12-13 02:56:31
问题 I used to set PaperSize in Matlab to control the font size in different axis. This is better than directly changing the fontsize. I think this kind of procedure can be working for gnuplot too. Here some overview of papersize in Matlab. An unanswered question here in SO about setting fontsize with partisan view how to do it. So Matlab's command set(hFig, 'PaperSize',[X Y]) Is there any similar way to control the papersize in Gnuplot as Matlab? I want to get consistent font sizes in my plots.

Using XDG directory specification on Java application

↘锁芯ラ 提交于 2019-12-13 00:09:48
问题 I'm trying to follow XDG directory specification on my Java application. I have already used it for application data: protected String getDefaultDataDir() { String rootPath = System.getenv("XDG_DATA_HOME"); if(rootPath == null) { rootPath = System.getProperty("user.home")+S+".local"+S+"share"; } return rootPath+S+Pinocchio.PLATFORMNAME; } ( S is a constant containing System.getProperty("file.separator") ) I want now to store documents on the user documents' folder. But I don't have an

Linux的起源和发展

谁说我不能喝 提交于 2019-12-12 15:49:47
Linux教程 Linux的起源和发展 Linxu的起源 1991年, Linus Torvalds 尚是芬兰赫尔辛基大学的一名学生,他在学校学Minix操作系统的课程,Minix:MINIX是一种基于微内核架构的类UNIX计算机操作系统,只是一个用于教学目的的简单操作系统,而不是一个强有力的实用操作系统,然而最大的好处就是公开源代码。全世界学计算机的学生都通过钻研MINIX源代码来了解电脑里运行的MINIX操作系统,芬兰赫尔辛基大学大学二年级的学生Linus Torvalds就是其中一个,在吸收了MINIX精华的基础上,Linus于1991年写出了属于自己的Linux操作系统,这个系统就是Linux,意思是Linus的Minix(Linus's Minix),最初系统版本为Linux0.01,是Linux时代开始的标志 受 GNU计划 的思想影响,Linus将源代码公开发布到网络上,Linus没有想到的是,这个内核迅速引起了全世界的关注,1993年,大约有100余名程序员参与了Linux内核代码编写/修改工作,其中核心组由5人组成,此时Linux 0.99版本的代码大约有十万行,用户大约有10万左右,这时已经是互联网的时代,他们不用相识,不用谋面,通过网络讨论,通过网络协作,推进着Linux 1994年,Linux1.0发布,代码量17万行,当时是按照完全自由免费的协议发布

Navigate using function call stack in gdb

此生再无相见时 提交于 2019-12-12 12:03:47
问题 In Visual Studio, if you click on an entry in the call stack, that opens editor and shows you the source code for that function. Is something similar possible in gdb? I use tui (text user interface) in gdb. Is it possible to make tui show source code for a given entry in backtrace? If not, then how do you make use of information in backtrace? Do you manually open the files and navigate to correct line? 回答1: When you stopped with gdb (in any mode) in breakpoint and can see backtrace with

Can someone explain this directly assembled x86 JMP opcode?

大城市里の小女人 提交于 2019-12-12 10:35:41
问题 At school we have been using a bootstrap program to run stand-alone programs without an operating system. I have been studying this program and when protected mode is enabled there is a far jump executed by directly assembling the opcode and operands as data within the program. This was for the GNU assembler: /* this code immediately follows the setting of the PE flag in CR0 */ .byte 0x66, 0xEA .long TARGET_ADDRESS .word 0x0010 /* descriptor #2, GDT, RPL=0 */ First of all, why would one want

GNU Make for loop with two variables

此生再无相见时 提交于 2019-12-12 10:34:03
问题 I want to write something along these lines: $(foreach (var1, var2), ($(LIST1), $(LIST2)), cp $(var1) $(var2);) How do I go about doing this in a GNU makefile? 回答1: Beta's suggestion to use join is on the right track, but the problem is that it's not so easy to use it in a way that constructs a command line containing whitespace, such as the one you originally wanted: $(foreach (var1, var2), ($(LIST1), $(LIST2)), cp $(var1) $(var2);) because join joins words together: it was originally

How to determine a tar archive's format

倖福魔咒の 提交于 2019-12-12 09:59:37
问题 In Linux, how can I determine the format which was used to create a given tarball? I'd like to detect whether a given archive was created using posix or gnu format. I've already read the man page for GNU tar, which explains how to control the format during creation. However, I don't see anything about how to view the format of an existing file. 回答1: You can use file under Linux to look at the fingerprint of the uncompressed archive (file won't peer beyond the compression layer, so decompress

Compiling gdb for remote debugging

给你一囗甜甜゛ 提交于 2019-12-12 07:56:53
问题 I'm trying to remote debug an application running on arm9 So far I've been able to cross compile and execute gdbserver on my device. get gdb (7.2) sources and extract them ./configure --target=arm-none-linux-gnueabi --with-expat=/usr/local/lib/ make cd gdb/gdbserver ./configure --host=arm-none-linux-gnueabi make tftp gdbserver to my device run and connect via gdb to the device gdbserver "seems" to start correctly and attach itself to my helloworld application When I try to gdb to the remote

Is there an equivilant of _set_purecall_handler() in Linux?

ぐ巨炮叔叔 提交于 2019-12-12 04:44:15
问题 I wanted to override the standard handler for pure virtual call ( __cxa_pure_virtual() ) with my own. Answer for Windows is '_set_purecall_handler()'. Is there a similar facility in Linux/GNU? 回答1: You came so close to answering this question on your own. This is the source of __cxa_pure_virtual in gcc/libstdc++-v3/libsupc++/pure.cc: extern "C" void __cxxabiv1::__cxa_pure_virtual (void) { writestr ("pure virtual method called\n"); std::terminate (); } So, there's no direct equivalent to